def _create_missing_data(dataset, rng, threshold):
    """Creates missing data for unittests."""
    mask = rng.uniform(0, 1, dataset.shape) < threshold
    dataset2 = dataset.copy()
    dataset2[mask] = 2222
    return dataset2