def pack_variables(ds: Dataset) -> Dataset:
    ds = ds.drop_vars(['call_dosage', 'call_dosage_mask'], errors='ignore')
    gp = ds['call_genotype_probability'][..., 1:]
    gp_mask = ds['call_genotype_probability_mask'].any(dim='genotypes')
    ds = ds.drop_vars(['call_genotype_probability', 'call_genotype_probability_mask'])
    ds = ds.assign(call_genotype_probability=gp, call_genotype_probability_mask=gp_mask)
    return ds
def pack_variables(ds: Dataset) -> Dataset:
    ds = ds.drop_vars(['call_dosage', 'call_dosage_mask'], errors='ignore')
    gp = ds['call_genotype_probability'][..., 1:]
    gp_mask = ds['call_genotype_probability_mask'].any(dim='genotypes')
    ds = ds.drop_vars(['call_genotype_probability', 'call_genotype_probability_mask'])
    ds = ds.assign(call_genotype_probability=gp, call_genotype_probability_mask=gp_mask)
    return ds