code: def test_invalid_session_backend_option():
      @dont_initialize_flask_app_submodules(
          skip_all_except=[
              "init_api_connexion",
              "init_appbuilder",
              "init_appbuilder_links",
              "init_appbuilder_views",
              "init_flash_views",
              "init_jinja_globals",
              "init_plugins",
              "init_airflow_session_interface",
          ]
      )
      def poorly_configured_app_factory():
          with conf_vars(
              {
                  (
                      "webserver",
                      "session_backend",
                  ): "invalid_value_for_session_backend"
              }
          ):
              return app.create_app(testing=True)
  
      expected_exc_regex = (
          "^Unrecognized session backend specified in web_server_session_backend: "
          r"'invalid_value_for_session_backend'\. Please set this to .+\.$"
      )
      with pytest.raises(
          AirflowConfigException, match=expected_exc_regex
      ):
          poorly_configured_app_factory()
  
file_path: airflow/tests/www/views/test_session.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.exceptions import AirflowConfigException
  from airflow.www import app
  from tests.test_utils.config import conf_vars
  from tests.test_utils.decorators import dont_initialize_flask_app_submodules
label_desc: Use image node_id 4 for calling a global function with example usage: test_invalid_session_backend_option() and returns: app