code: def custom_task_log_handler_config():
      DEFAULT_LOGGING_CONFIG["handlers"]["task"] = {
          "class": TASK_HANDLER_CLASS,
          "formatter": "airflow",
          "stream": "sys.stdout",
      }
      logging.config.dictConfig(DEFAULT_LOGGING_CONFIG)
      logging.root.disabled = False
      yield
      DEFAULT_LOGGING_CONFIG["handlers"]["task"] = PREV_TASK_HANDLER
      logging.config.dictConfig(DEFAULT_LOGGING_CONFIG)
  
file_path: airflow/tests/utils/test_task_handler_with_custom_formatter.py
imports: from __future__ import annotations
  import logging
  import pytest
  from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG
  from airflow.models.dag import DAG
  from airflow.models.taskinstance import TaskInstance
  from airflow.operators.empty import EmptyOperator
  from airflow.utils.log.logging_mixin import set_context
  from airflow.utils.state import DagRunState
  from airflow.utils.timezone import datetime
  from airflow.utils.types import DagRunType
  from tests.test_utils.config import conf_vars
  from tests.test_utils.db import clear_db_runs
label_desc: Use image node_id 1 for calling a global function with example usage: custom_task_log_handler_config() without return types