docs: def _serialize(self, include_run_logs=False, strict_json=False):
          """ Serialize a representation of this Job to a Python dict object. """
  
          # return tasks in sorted order if graph is in a valid state
          try:
              topo_sorted = self.topological_sort()
              t = [self.tasks[task]._serialize(include_run_logs=include_run_logs,
                                               strict_json=strict_json)
                   for task in topo_sorted]
          except:
              t = [task._serialize(include_run_logs=include_run_logs,
                                   strict_json=strict_json)
                   for task in self.tasks.itervalues()]
  
          dependencies = {}
          for k, v in self.graph.iteritems():
              dependencies[k] = list(v)
  
          result = {'job_id': self.job_id,
                    'name': self.name,
                    'parent_id': self.parent.dagobah_id,
                    'tasks': t,
                    'dependencies': dependencies,
                    'status': self.state.status,
                    'cron_schedule': self.cron_schedule,
                    'next_run': self.next_run,
                    'notes': self.notes}
  
          if strict_json:
              result = json.loads(json.dumps(result, cls=StrictJSONEncoder))
          return result