def layer_present(self, layer):
        return layer in self.collect or \
            getattr(layer, 'data', None) in self.collect
Test that a layer exists in the data collection
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/tests/test_layer_tree_widget.py/TestLayerTree.layer_present