code: def test_should_support_custom_legacy_task_runner(self):
      mock.MagicMock(
          **{
              "task_instance.get_template_context.return_value": {
                  "ti": mock.MagicMock()
              }
          }
      )
      custom_task_runner.reset_mock()
  
      task_runner = get_task_runner(custom_task_runner)
  
      custom_task_runner.assert_called_once_with(custom_task_runner)
  
      assert custom_task_runner.return_value == task_runner
  
file_path: airflow/tests/task/task_runner/test_task_runner.py
imports: from __future__ import annotations
  from unittest import mock
  import pytest
  from airflow.jobs.local_task_job_runner import LocalTaskJobRunner
  from airflow.task.task_runner import CORE_TASK_RUNNERS, get_task_runner
  from airflow.utils.module_loading import import_string
label_desc: Use image node_id 3 for calling the TestGetTaskRunner obj's underlying member method code with example usage: obj.test_should_support_custom_legacy_task_runner() without return types