code: def get_canonical_names(packages):
      
      from .vendor.packaging.utils import canonicalize_name
  
      if not isinstance(packages, Sequence):
          if not isinstance(packages, six.string_types):
              return packages
          packages = [packages]
      return set([canonicalize_name(pkg) for pkg in packages if pkg])
docs: Canonicalize a list of packages and return a set of canonical names