code: def _make_graph(self, max_insert):
          '''helper function to construct graph from current state of object'''
          if len(self.partial_links) != 0:
              raise Error('Error in _make_graph(). Cannot continue because there are partial links')
          
          self.contig_links = {}
          for key in self.links:
              for l in self.links[key]:
                  insert_size = l.insert_size()
                  if insert_size <= max_insert:
                      if key not in self.contig_links:
                          self.contig_links[key] = {}
                      dirs = ''.join(l.dirs)
                      self.contig_links[key][dirs] = self.contig_links[key].get(dirs, 0) + f _make_graph(self, max_insert):
          '''helper function to construct graph from current state of object'''
          if len(self.partial_links) != 0:
              raise Error('Error in _make_graph(). Cannot continue because there are partial links')
          
          self.contig_links = {}
          for key in self.links:
              for l in self.links[key]:
                  insert_size = l.insert_size()
                  if insert_size <= max_insert:
                      if key not in self.contig_links:
                          self.contig_links[key] = {}
                      dirs = ''.join(l.dirs)
                      self.contig_links[key][dirs] = self.contig_links[key].get(dirs, 0) + 1
docs: helper function to construct graph from current state of object