code: def init_supervisor_data(dotfile, sample_sets):
      
      with open(dotfile) as wf:
          graph_data = wf.read()
  
      graph = pydot.graph_from_dot_data(graph_data)[0]
      nodes = [n.get_name().strip('"') for n in graph.get_nodes()]
  
      monitor_data = dict()
      dependencies = {n:[] for n in nodes}
  
      # Initialize empty list of dependencies
      for n in nodes:
          monitor_data[n] = dict()
          for sset in sample_sets:
              monitor_data[n][sset] = {
                  'state'        : "Not Started",
                  'evaluated'    : False,
                  'succeeded'    : False
              }
  
      edges = graph.get_edges()
  
      # Iterate over the edges, and get the dependency information for each node
      for e in edges:
          source = e.get_source().strip('"')
          dest = e.get_destination().strip('"')
  
          dep = e.get_attributes()
          dep['upstream_task'] = source
  
          dependencies[dest].append(dep)
  
      return monitor_data, dependencies
docs: Parse a workflow description written in DOT (like Firehose)