code: def _get_ext_namespaces(config):
      '''
      Get namespaces from the existing configuration.
  
      :param config:
      :return:
      '''
      namespaces = {}
      if not config:
          return namespaces
  
      for ns in config:
          constraint_version = tuple(config[ns].get('py-version', []))
          if not constraint_version:
              raise salt.exceptions.SaltSystemExit("An alternative version is configured, but not defined "
                                                   "to what Python's major/minor version it should be constrained.")
          else:
              namespaces[ns] = constraint_version
  
      return namespacef _get_ext_namespaces(config):
      '''
      Get namespaces from the existing configuration.
  
      :param config:
      :return:
      '''
      namespaces = {}
      if not config:
          return namespaces
  
      for ns in config:
          constraint_version = tuple(config[ns].get('py-version', []))
          if not constraint_version:
              raise salt.exceptions.SaltSystemExit("An alternative version is configured, but not defined "
                                                   "to what Python's major/minor version it should be constrained.")
          else:
              namespaces[ns] = constraint_version
  
      return namespaces
docs: Get namespaces from the existing configuration.
  
      :param config:
      :return: