code: def sort_versions(self):
          if self.sorted:
              return
          for orderer in (self.solver.package_orderers or []):
              entries = orderer.reorder(self.entries, key=lambda x: x.package)
              if entries is not None:
                  self.entries = entries
                  self.sorted = True
                  if self.pr:
                      self.pr("sorted: %s packages: %s", self.package_name, repr(orderer))
                  return
          self.entries = sorted(self.entries, key=lambda x: x.version, reverse=True)
          self.sorted = True
          if self.pr:
              self.pr("sorted: %s packages: version descending", self.package_name)