def _read_metafile_partition(path: Path, partition: int) -> pd.DataFrame:
    with bgen_metafile(path) as mf:
        part = mf.read_partition(partition)
    v = part.variants
    allele_ids = np.array([_split_alleles(aid) for aid in v.allele_ids])
    data = {'id': v.id, 'rsid': v.rsid, 'chrom': v.chromosome, 'pos': v.position, 'a1': allele_ids[:, 0], 'a2': allele_ids[:, 1], 'offset': v.offset}
    return pd.DataFrame(data).astype(METAFILE_DTYPE)
def _read_metafile_partition(path: Path, partition: int) -> pd.DataFrame:
    with bgen_metafile(path) as mf:
        part = mf.read_partition(partition)
    v = part.variants
    allele_ids = np.array([_split_alleles(aid) for aid in v.allele_ids])
    data = {'id': v.id, 'rsid': v.rsid, 'chrom': v.chromosome, 'pos': v.position, 'a1': allele_ids[:, 0], 'a2': allele_ids[:, 1], 'offset': v.offset}
    return pd.DataFrame(data).astype(METAFILE_DTYPE)