parameters: (cleaner, iam_user_name, iam_access_key_id)
return_statement: return True
docstring: Verifies if an access key exists. This is should be replaced once iam supports Waiter objects for access key
      deletions.
      :param cleaner: A Cleaner object from the main cleanup.py script
      :param iam_access_key_id: Can be retrieved from the boto3 list_access_keys() with
      response['AccessKeyMetadata']['AccessKeyId']
      :return: True if the access key exists, False if it doesn't exist or an error occurs.
docstring_summary: Verifies if an access key exists. This is should be replaced once iam supports Waiter objects for access key
      deletions.
      :param cleaner: A Cleaner object from the main cleanup.py script
      :param iam_access_key_id: Can be retrieved from the boto3 list_access_keys() with
      response['AccessKeyMetadata']['AccessKeyId']
      :return: True if the access key exists, False if it doesn't exist or an error occurs.
docstring_tokens: Verifies if an access key exists . This is should be replaced once iam supports Waiter objects for access key deletions . : param cleaner : A Cleaner object from the main cleanup . py script : param iam_access_key_id : Can be retrieved from the boto3 list_access_keys () with response [ AccessKeyMetadata ] [ AccessKeyId ] : return : True if the access key exists False if it doesn t exist or an error occurs .
function: def __access_key_exists(cleaner, iam_user_name, iam_access_key_id):
      """
      Verifies if an access key exists. This is should be replaced once iam supports Waiter objects for access key
      deletions.
      :param cleaner: A Cleaner object from the main cleanup.py script
      :param iam_access_key_id: Can be retrieved from the boto3 list_access_keys() with
      response['AccessKeyMetadata']['AccessKeyId']
      :return: True if the access key exists, False if it doesn't exist or an error occurs.
      """
      try:
          # We use update_access_key() to verify if a single key exists. Setting 'Status' to 'Inactive' because
          # it is a required field and we do not want to set to 'Active'
          cleaner.iam.update_access_key(UserName=iam_user_name, AccessKeyId=iam_access_key_id, Status='Inactive')
      except cleaner.iam.exceptions.NoSuchEntityException:
          return False
      except ClientError as err:
          print("      ERROR: Unexpected error occurred when checking if access key {0} exists due to {1}"
                .format(iam_access_key_id, exception_utils.message(err)))
          return False
      return True
function_tokens: def __access_key_exists ( cleaner , iam_user_name , iam_access_key_id ) : try : # We use update_access_key() to verify if a single key exists. Setting 'Status' to 'Inactive' because # it is a required field and we do not want to set to 'Active' cleaner . iam . update_access_key ( UserName = iam_user_name , AccessKeyId = iam_access_key_id , Status = 'Inactive' ) except cleaner . iam . exceptions . NoSuchEntityException : return False except ClientError as err : print ( "      ERROR: Unexpected error occurred when checking if access key {0} exists due to {1}" . format ( iam_access_key_id , exception_utils . message ( err ) ) ) return False return True