code: def register_editor(self, editor, parent, ensure_uniqueness=False):
          
  
          if ensure_uniqueness:
              if self.get_editor_nodes(editor):
                  raise foundations.exceptions.ProgrammingError("{0} | '{1}' editor is already registered!".format(
                      self.__class__.__name__, editor))
  
          LOGGER.debug("> Registering '{0}' editor.".format(editor))
  
          row = parent.children_count()
          self.beginInsertRows(self.get_node_index(parent), row, row)
          editor_node = EditorNode(editor=editor,
                                   parent=parent)
          self.endInsertRows()
  
          self.editor_registered.emit(editor_node)
  
          return editor_node
docs: Registers given :class:`umbra.components.factory.script_editor.editor.Editor` class editor in the Model.
  
          :param editor: Editor to register.
          :type editor: Editor
          :param parent: EditorNode parent.
          :type parent: GraphModelNode
          :param ensure_uniqueness: Ensure registrar uniqueness.
          :type ensure_uniqueness: bool
          :return: EditorNode.
          :rtype: EditorNode