def add_layer(self, layer=None):
        layer = layer or core.Data()
        self.widget.data_collection.append(layer)
        return layer
Add a layer through a hub message
dataset/ETHPy150Open glue-viz/glue/glue/app/qt/tests/test_layer_tree_widget.py/TestLayerTree.add_layer