defmain():"""Parse the arguments to process the single cell collection."""parser=argparse.ArgumentParser()parser.add_argument("--num-workers",type=int,default=4,help="The number of AnnData loaders to run in parallel [4].")parser.add_argument("--use-mp",action="store_true",default=False,help="Use a subprocess for each worker rather than a lightweight OS thread [False].",)parser.add_argument("--data-path",type=str,required=True,help="A path containing AnnData files. Note: These will all be concatenated.",)parser.add_argument("--save-path",required=True,type=str,help="An output path where an SCDataset will be stored.")args=parser.parse_args()withtempfile.TemporaryDirectory()astemp_dir:coll=SingleCellCollection(temp_dir)coll.load_h5ad_multi(args.data_path,max_workers=args.num_workers,use_processes=args.use_mp)coll.flatten(args.save_path,destroy_on_copy=True)