docstr: Returns context without global arguments
docstr_tok: ["Returns","context","without","global","arguments"]
code: def local_context(self):
      """Returns context without global arguments"""
      result = self.context.copy()
      keys_to_delete = [
          # flask.templating._default_template_ctx_processor
          "g",
          "request",
          "session",
          # flask_wtf.csrf.CSRFProtect.init_app
          "csrf_token",
          # flask_login.utils._user_context_processor
          "current_user",
          # flask_appbuilder.baseviews.BaseView.render_template
          "appbuilder",
          "base_template",
          # airflow.www.app.py.create_app (inner method - jinja_globals)
          "server_timezone",
          "default_ui_timezone",
          "hostname",
          "navbar_color",
          "navbar_text_color",
          "navbar_hover_color",
          "navbar_text_hover_color",
          "navbar_logo_text_color",
          "log_fetch_delay_sec",
          "log_auto_tailing_offset",
          "log_animation_speed",
          "state_color_mapping",
          "airflow_version",
          "git_version",
          "k8s_or_k8scelery_executor",
          # airflow.www.static_config.configure_manifest_files
          "url_for_asset",
          # airflow.www.views.AirflowBaseView.render_template
          "scheduler_job",
          # airflow.www.views.AirflowBaseView.extra_args
          "macros",
          "auth_manager",
      ]
      for key in keys_to_delete:
          del result[key]
  
      return result
  
imports: from __future__ import annotations
  from contextlib import contextmanager
  from typing import Any, Generator, NamedTuple
  import flask
  import jinja2
  import pytest
  from airflow import settings
  from airflow.models import DagBag
  from airflow.www.app import create_app
  from tests.test_utils.api_connexion_utils import delete_user
  from tests.test_utils.config import conf_vars
  from tests.test_utils.decorators import dont_initialize_flask_app_submodules
  from tests.test_utils.www import client_with_login, client_without_login, client_without_login_as_admin
label_desc: Use image node_id 2 for calling the _TemplateWithContext obj's underlying member method code with example usage: obj.local_context() and returns: result