code: def compare_evrs(evr_a, evr_b):
      
      a_epoch, a_ver, a_rel = evr_a
      b_epoch, b_ver, b_rel = evr_b
      if a_epoch != b_epoch:
          return a_newer if a_epoch > b_epoch else b_newer
      ver_comp = compare_versions(a_ver, b_ver)
      if ver_comp != a_eq_b:
          return ver_comp
      rel_comp = compare_versions(a_rel, b_rel)
      return rel_comp
docs: Compare two EVR tuples to determine which is newer
  
      This method compares the epoch, version, and release of the
      provided package strings, assuming that epoch is 0 if not provided.
      Comparison is performed on the epoch, then the version, and then
      the release. If at any point a non-equality is found, the result is
      returned without any remaining comparisons being performed (e.g. if
      the epochs of the packages differ, the versions are releases are
      not compared).
  
      :param tuple evr_a: an EVR tuple
      :param tuple evr_b: an EVR tuple