Batch replace internalised clusters with a reference

Hi All

I have multiple cluster instances in grasshopper. The best way I’ve found to convert all these to reference clusters that link to one file is to ‘export & reference’ each and every cluster one-by-one, overwriting the single file on the drive.

Does anyone know any workarounds to batch replace all instances of an internalised cluster to point to a reference cluster?