code: def get_authversion(job_args):
      
  
      _version = job_args.get('os_auth_version')
      for version, variants in AUTH_VERSION_MAP.items():
          if _version in variants:
              authversion = job_args['os_auth_version'] = version
              return authversion
      else:
          raise exceptions.AuthenticationProblem(
              "Auth Version must be one of %s.",
              list(AUTH_VERSION_MAP.keys())
          )
docs: Get or infer the auth version.
  
      Based on the information found in the *AUTH_VERSION_MAP* the authentication
      version will be set to a correct value as determined by the
      **os_auth_version** parameter as found in the `job_args`.
  
      :param job_args: ``dict``
      :returns: ``str``