def METHOD_NAME(self):
    n_neurons = 5
    label = "pop_1"
    sim.setup(timestep=1.0)
    pop_1 = sim.Population(n_neurons, sim.IF_curr_exp(), label=label)
    mask = [1, 3]
    view = PopulationView(pop_1, mask, label=label)
    self.assertEqual(2, view.size)
    self.assertEqual(2, view.local_size)
    random_view = pop_1.sample(3)
    self.assertEqual(3, random_view.size)
    self.assertEqual(label, view.label)
    self.assertEqual(pop_1.celltype, view.celltype)
    self.assertEqual(pop_1.celltype, random_view.celltype)
    view_initial_values = view.initial_values
    pop_initial_values = pop_1.initial_values
    self.assertEqual(len(view_initial_values), len(pop_initial_values))
    for key in pop_initial_values:
        self.assertEqual(
            pop_initial_values[key][3], view_initial_values[key][1])
    self.assertEqual(pop_1, view.parent)
    self.assertEqual(mask, view.mask)
    cells = view.all_cells
    self.assertEqual(2, len(cells))
    self.assertEqual(1, cells[0].id)
    self.assertEqual(3, cells[1].id)
    self.assertEqual(cells, view.local_cells)
    self.assertEqual(cells[0], view[1])
    iterator = iter(view)
    self.assertEqual(1, next(iterator).id)
    self.assertEqual(3, next(iterator).id)
    with pytest.raises(StopIteration):
        next(iterator)
    self.assertEqual(2, len(view))
    iterator = view.all()
    self.assertEqual(1, next(iterator).id)
    self.assertEqual(3, next(iterator).id)
    with pytest.raises(StopIteration):
        next(iterator)
    self.assertEqual(view.conductance_based, pop_1.conductance_based)
    describe = view.describe()
    self.assertIn('PopulationView "pop_1"', describe)
    self.assertIn('parent : "pop_1"', describe)
    self.assertIn('size   : 2', describe)
    self.assertIn('mask   : [1, 3]', describe)
    self.assertEqual(pop_1.find_units("v"), view.find_units("v"))
    sim.end()