code: def add_port(self, port):
          
          self.ports.append(port)
          if port.io_type not in self.port_seqs:
              self.port_seqs[port.io_type] = 0
          self.port_seqs[port.io_type] += 1
          port.sequence = self.port_seqs[port.io_type]
          return self
docs: Add a port object to the definition
  
          :param port: port definition
          :type port: PortDef