code: def _get_longest_hit_by_ref_length(self, nucmer_hits):
          '''Input: list of nucmer hits. Returns the longest hit, taking hit length on the reference'''
          if len(nucmer_hits) == 0:
              return None
  
          max_length = None
          longest_hit = None
          for hit in nucmer_hits:
              if max_length is None or hit.hit_length_ref > max_length:
                  max_length = hit.hit_length_ref
                  longest_hit = copy.copy(hit)
  
          assert longest_hit is not None
          return longest_hif _get_longest_hit_by_ref_length(self, nucmer_hits):
          '''Input: list of nucmer hits. Returns the longest hit, taking hit length on the reference'''
          if len(nucmer_hits) == 0:
              return None
  
          max_length = None
          longest_hit = None
          for hit in nucmer_hits:
              if max_length is None or hit.hit_length_ref > max_length:
                  max_length = hit.hit_length_ref
                  longest_hit = copy.copy(hit)
  
          assert longest_hit is not None
          return longest_hit
docs: Input: list of nucmer hits. Returns the longest hit, taking hit length on the reference