docs: def _get_environment_updates(self, display_all_distributions=False):
          """
          Check all pacakges installed in the environment to see if there are
          any updates availalble.
  
          Args:
              display_all_distributions (bool): Return distribution even if it is
                  up-to-date. Defaults to ``False``.
  
          Returns:
              list: A list of Update objects ordered based on ``instance.name``.
          """
          updates = []
          for distribution in self.pip.get_installed_distributions():
  
              versions = self.get_available_versions(distribution.project_name)
              max_version = max(versions.keys()) if versions else UNKNOW_NUM
  
              update = None
              distribution_version = self._parse_version(distribution.version)
              if versions and max_version > distribution_version:
                  update = Update(
                      distribution.project_name,
                      distribution.version,
                      versions[max_version],
                      prelease=max_version[-1]
                  )
  
              elif (
                  display_all_distributions and
                  max_version == distribution_version
              ):
                  update = Update(
                      distribution.project_name,
                      distribution.version,
                      versions[max_version],
                  )
  
              elif display_all_distributions:
                  update = Update(
                      distribution.project_name,
                      distribution.version,
                      UNKNOWN
                  )
  
              if update:
                  updates.append(update)
  
          return sorted(updates, key=lambda x: x.name)