docs: def convert_package_names(package_names):
      """
      Convert package names, which can be a string of a number of package
      names or requirements separated by spaces.
      """
  
      results = []
      errors = []
  
      for name in (
              package_names.split()
              if hasattr(package_names, 'split') else package_names):
          try:
              Requirement.parse(name)
          except ValueError:
              errors.append(name)
          else:
              results.append(name)
  
      return results, errors