def test_add(self):
        data = core.Data()
        assert not self.layer_present(data)
        self.add_layer(data)
        assert self.layer_present(data)
Allows use of the index [] operator to get a layer at the index.
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/tests/test_layer_tree_widget.py/TestLayerTree.test_add--crossover with--dataset/ETHPy150Open django/django/django/contrib/gis/gdal/datasource.py/DataSource.__getitem__