def _prepate_data(self, n_cells: int, n_genes: int, n_groups: int):
    if (self.noise_model == 'nb'):
        from batchglm.api.models.glm_nb import Simulator
        rand_fn_loc = (lambda shape: np.random.uniform(0.1, 1, shape))
        rand_fn_scale = (lambda shape: np.random.uniform(0.5, 1, shape))
    elif ((self.noise_model == 'norm') or (self.noise_model is None)):
        from batchglm.api.models.glm_norm import Simulator
        rand_fn_loc = (lambda shape: np.random.uniform(500, 1000, shape))
        rand_fn_scale = (lambda shape: np.random.uniform(1, 2, shape))
    else:
        raise ValueError(('noise model %s not recognized' % self.noise_model))
    sim = Simulator(num_observations=n_cells, num_features=n_genes)
    sim.generate_sample_description(num_batches=0, num_conditions=0)
    sim.generate_params(rand_fn_loc=rand_fn_loc, rand_fn_scale=rand_fn_scale)
    sim.generate_data()
    random_sample_description = pd.DataFrame({'condition': np.random.randint(n_groups, size=sim.nobs)})
    return (sim, random_sample_description)
def _prepate_data(self, n_cells: int, n_genes: int, n_groups: int):
    if (self.noise_model == 'nb'):
        from batchglm.api.models.glm_nb import Simulator
        rand_fn_loc = (lambda shape: np.random.uniform(0.1, 1, shape))
        rand_fn_scale = (lambda shape: np.random.uniform(0.5, 1, shape))
    elif ((self.noise_model == 'norm') or (self.noise_model is None)):
        from batchglm.api.models.glm_norm import Simulator
        rand_fn_loc = (lambda shape: np.random.uniform(500, 1000, shape))
        rand_fn_scale = (lambda shape: np.random.uniform(1, 2, shape))
    else:
        raise ValueError(('noise model %s not recognized' % self.noise_model))
    sim = Simulator(num_observations=n_cells, num_features=n_genes)
    sim.generate_sample_description(num_batches=0, num_conditions=0)
    sim.generate_params(rand_fn_loc=rand_fn_loc, rand_fn_scale=rand_fn_scale)
    sim.generate_data()
    random_sample_description = pd.DataFrame({'condition': np.random.randint(n_groups, size=sim.nobs)})
    return (sim, random_sample_description)