'Commit the selected data to output.'

def commit(self):

    if (self.instances is None):
        self.send('Selected    Data', None)
        self.send(ANNOTATED_DATA_SIGNAL_NAME, None)
        return
    nodes = [i.tree_node.label for i in self.scene.selectedItems() if isinstance(i, SquareGraphicsItem)]
    data = self.tree_adapter.get_instances_in_nodes(nodes)
    self.send('Selected    Data', data)
    selected_indices = self.tree_adapter.get_indices(nodes)
    self.send(ANNOTATED_DATA_SIGNAL_NAME, create_annotated_table(self.instances, selected_indices))
