code: def to_dict(self):
          '''Save this condition into a dictionary.'''
          d = {'sequence': self.sequence,
                  'targetComponent': self.target_component.to_dict()}
          props = []
          for name in self.properties:
              p = {'name': name}
              if self.properties[name]:
                  p['value'] = str(self.properties[name])
              props.append(p)
          if props:
              d[RTS_EXT_NS_YAML + 'properties'] = props
          return f to_dict(self):
          '''Save this condition into a dictionary.'''
          d = {'sequence': self.sequence,
                  'targetComponent': self.target_component.to_dict()}
          props = []
          for name in self.properties:
              p = {'name': name}
              if self.properties[name]:
                  p['value'] = str(self.properties[name])
              props.append(p)
          if props:
              d[RTS_EXT_NS_YAML + 'properties'] = props
          return d
docs: Save this condition into a dictionary.