code: def aws_app():
      def factory():
          with conf_vars(
              {
                  (
                      "core",
                      "auth_manager",
                  ): "airflow.providers.amazon.aws.auth_manager.aws_auth_manager.AwsAuthManager",
                  ("aws_auth_manager", "enable"): "True",
                  (
                      "aws_auth_manager",
                      "saml_metadata_url",
                  ): SAML_METADATA_URL,
              }
          ):
              with patch(
                  "airflow.providers.amazon.aws.auth_manager.views.auth.OneLogin_Saml2_IdPMetadataParser"
              ) as mock_parser:
                  mock_parser.parse_remote.return_value = (
                      SAML_METADATA_PARSED
                  )
                  return application.create_app(testing=True)
  
      return factory()
  
file_path: airflow/tests/providers/amazon/aws/auth_manager/views/test_auth.py
imports: from __future__ import annotations
  from unittest.mock import Mock, patch
  import pytest
  from flask import session, url_for
  from airflow.exceptions import AirflowException
  from airflow.www import app
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 1 for calling a global function with example usage: aws_app() and returns: factory, application