code: def _build_graph(self):
          
          self._graph.add_nodes_from(self.tasks)
          for node1 in self._graph.nodes:
              for node2 in self._graph.nodes:
                  for input_file in node1.inputs:
                      for output_file in node2.outputs:
                          if output_file == input_file:
                              self._graph.add_edge(node2, node1)
          for order, task in enumerate(topological_sort(self._graph)):
              task.predecessors = self._graph.predecessors(task)
              task.order = order
docs: Produce a dependency graph based on a list
              of tasks produced by the parser.