code: def ti(dag_maker):
      with dag_maker() as dag:
  
          @dag.task()
          def nothing():
              return None
  
          nothing()
  
      dr = dag.create_dagrun("running", run_id="abc")
      ti = dr.get_task_instances()[0]
      yield ti
  
file_path: airflow/tests/utils/log/test_task_context_logger.py
imports: from __future__ import annotations
  import logging
  from unittest.mock import Mock
  import pytest
  from airflow.utils.log.task_context_logger import TaskContextLogger
  from tests.test_utils.config import conf_vars
label_desc: Use image node_id 2 for calling a global function with example usage: ti(dag_maker) and returns: None