code: def from_dict(self, graph_dict):
          
  
          self.reset_graph()
          for new_node in six.iterkeys(graph_dict):
              self.add_node(new_node)
          for ind_node, dep_nodes in six.iteritems(graph_dict):
              if not isinstance(dep_nodes, list):
                  raise TypeError('dict values must be lists')
              for dep_node in dep_nodes:
                  self.add_edge(ind_node, dep_node)
docs: Reset the graph and build it from the passed dictionary.
  
          The dictionary takes the form of {node_name: [directed edges]}