parameters: (cleaner, identity_pool_id)
return_statement: return True
docstring: Verifies if an identity pool exists. This is should be replaced once cognito supports Waiter objects for
      identity pool deletions.
      :param cleaner: A Cleaner object from the main cleanup.py script
      :param identity_pool_id: Can be retrieved from the boto3 list_identity_pools() with
      response['IdentityPools']['IdentityPoolId']
      :return: True if the identity pool exists, False if it doesn't exist or an error occurs.
docstring_summary: Verifies if an identity pool exists. This is should be replaced once cognito supports Waiter objects for
      identity pool deletions.
      :param cleaner: A Cleaner object from the main cleanup.py script
      :param identity_pool_id: Can be retrieved from the boto3 list_identity_pools() with
      response['IdentityPools']['IdentityPoolId']
      :return: True if the identity pool exists, False if it doesn't exist or an error occurs.
docstring_tokens: Verifies if an identity pool exists . This is should be replaced once cognito supports Waiter objects for identity pool deletions . : param cleaner : A Cleaner object from the main cleanup . py script : param identity_pool_id : Can be retrieved from the boto3 list_identity_pools () with response [ IdentityPools ] [ IdentityPoolId ] : return : True if the identity pool exists False if it doesn t exist or an error occurs .
function: def __identity_pool_exists(cleaner, identity_pool_id):
      """
      Verifies if an identity pool exists. This is should be replaced once cognito supports Waiter objects for
      identity pool deletions.
      :param cleaner: A Cleaner object from the main cleanup.py script
      :param identity_pool_id: Can be retrieved from the boto3 list_identity_pools() with
      response['IdentityPools']['IdentityPoolId']
      :return: True if the identity pool exists, False if it doesn't exist or an error occurs.
      """
      try:
          cleaner.cognito_identity.describe_identity_pool(IdentityPoolId=identity_pool_id)
      except cleaner.cognito_identity.exceptions.ResourceNotFoundException:
          return False
      except ClientError as err:
          print("      ERROR: Unexpected error occurred when checking if pool {0} exists due to {1}"
                .format(identity_pool_id, exception_utils.message(err)))
          return False
      return True
function_tokens: def __identity_pool_exists ( cleaner , identity_pool_id ) : try : cleaner . cognito_identity . describe_identity_pool ( IdentityPoolId = identity_pool_id ) except cleaner . cognito_identity . exceptions . ResourceNotFoundException : return False except ClientError as err : print ( "      ERROR: Unexpected error occurred when checking if pool {0} exists due to {1}" . format ( identity_pool_id , exception_utils . message ( err ) ) ) return False return True