code: def build(self):
          
  
          assert not self.final, 'Trying to mutate a final graph.'
  
          # Replace each strongly connected component with a single node `NodeSet`
          for scc in sorted(nx.kosaraju_strongly_connected_components(self.graph),
                            key=len, reverse=True):
              if len(scc) == 1:
                  break
  
              self.shrink_to_node(NodeSet(scc))
  
          self.final = True
docs: Finalise the graph, after adding all input files to it.