def read_metafile(path: PathType) -> dd.DataFrame:
    'Read cbgen metafile containing partitioned variant info'
    with bgen_metafile(path) as mf:
        divisions = ([(mf.partition_size * i) for i in range(mf.npartitions)] + [(mf.nvariants - 1)])
        dfs = [dask.delayed(_read_metafile_partition)(path, i) for i in range(mf.npartitions)]
        meta = dd.utils.make_meta(METAFILE_DTYPE)
        return dd.from_delayed(dfs, meta=meta, divisions=divisions)
Read cbgen metafile containing partitioned variant info
def read_metafile(path: PathType) -> dd.DataFrame:
    
    with bgen_metafile(path) as mf:
        divisions = ([(mf.partition_size * i) for i in range(mf.npartitions)] + [(mf.nvariants - 1)])
        dfs = [dask.delayed(_read_metafile_partition)(path, i) for i in range(mf.npartitions)]
        meta = dd.utils.make_meta(METAFILE_DTYPE)
        return dd.from_delayed(dfs, meta=meta, divisions=divisions)