code: def parse_yaml(self, y):
          '''Parse a YAML specification of a data port into this object.'''
          self.name = y['name']
          if RTS_EXT_NS_YAML + 'comment' in y:
              self.comment = y[RTS_EXT_NS_YAML + 'comment']
          if RTS_EXT_NS_YAML + 'visible' in y:
              visible = y.get(RTS_EXT_NS_YAML + 'visible')
              if visible == True or visible == 'true' or visible == 'True':
                  self.visible = True
              else:
                  self.visible = False
          if RTS_EXT_NS_YAML + 'properties' in y:
              for p in y.get(RTS_EXT_NS_YAML + 'properties'):
                  if 'value' in p:
                      value = p['value']
                  else:
                      value = None
                  self._properties[p['name']] = value
          return self parse_yaml(self, y):
          '''Parse a YAML specification of a data port into this object.'''
          self.name = y['name']
          if RTS_EXT_NS_YAML + 'comment' in y:
              self.comment = y[RTS_EXT_NS_YAML + 'comment']
          if RTS_EXT_NS_YAML + 'visible' in y:
              visible = y.get(RTS_EXT_NS_YAML + 'visible')
              if visible == True or visible == 'true' or visible == 'True':
                  self.visible = True
              else:
                  self.visible = False
          if RTS_EXT_NS_YAML + 'properties' in y:
              for p in y.get(RTS_EXT_NS_YAML + 'properties'):
                  if 'value' in p:
                      value = p['value']
                  else:
                      value = None
                  self._properties[p['name']] = value
          return self
docs: Parse a YAML specification of a data port into this object.