parameters: (self, element)
docstring: Remove the element from the list of elements.
          If the element is a port, remove the whole block.
          If the element is a block, remove its connections.
          If the element is a connection, just remove the connection.
docstring_summary: Remove the element from the list of elements.
          If the element is a port, remove the whole block.
          If the element is a block, remove its connections.
          If the element is a connection, just remove the connection.
docstring_tokens: Remove the element from the list of elements . If the element is a port remove the whole block . If the element is a block remove its connections . If the element is a connection just remove the connection .
function: def remove_element(self, element):
          """
          Remove the element from the list of elements.
          If the element is a port, remove the whole block.
          If the element is a block, remove its connections.
          If the element is a connection, just remove the connection.
          """
          if element is self.options_block:
              return
  
          if element.is_port:
              element = element.parent_block  # remove parent block
  
          if element in self.blocks:
              # Remove block, remove all involved connections
              self.disconnect(*element.ports())
              self.blocks.remove(element)
  
          elif element in self.connections:
              self.connections.remove(element)
function_tokens: def remove_element ( self , element ) : if element is self . options_block : return if element . is_port : element = element . parent_block # remove parent block if element in self . blocks : # Remove block, remove all involved connections self . disconnect ( * element . ports ( ) ) self . blocks . remove ( element ) elif element in self . connections : self . connections . remove ( element )