code: def to_dict(self):
      
      ret = {}
      for key in ['name', 'cmd', 'id', 'start_time', 'end_time',
                  'outcome', 'start_time_string', 'start_delta_string']:
        val = getattr(self, key)
        ret[key] = val() if hasattr(val, '__call__') else val
      ret['parent'] = self.parent.to_dict() if self.parent else None
      return ret
docs: Useful for providing arguments to templates.
  
      :API: public