code: def dag_run_with_log_filename(tis):
      run_filters = [
          DagRun.dag_id == DAG_ID,
          DagRun.execution_date == DEFAULT_DATE,
      ]
      with create_session() as session:
          log_template = session.merge(
              LogTemplate(
                  filename=DIFFERENT_LOG_FILENAME,
                  elasticsearch_id="irrelevant",
              )
          )
          session.flush()  # To populate 'log_template.id'.
          run_query = session.query(DagRun).filter(*run_filters)
          run_query.update({"log_template_id": log_template.id})
          dag_run = run_query.one()
      # Dag has been updated, replace Dag in Task Instance
      ti, _ = tis
      ti.dag_run = dag_run
      yield dag_run
      with create_session() as session:
          session.query(DagRun).filter(*run_filters).update(
              {"log_template_id": None}
          )
          session.query(LogTemplate).filter(
              LogTemplate.id == log_template.id
          ).delete()
  
imports: from __future__ import annotations
  import copy
  import logging
  import logging.config
  import pathlib
  import shutil
  import sys
  import tempfile
  import unittest.mock
  import urllib.parse
  import pytest
  from airflow import settings
  from airflow.config_templates.airflow_local_settings import DEFAULT_LOGGING_CONFIG
  from airflow.models import DagBag, DagRun
  from airflow.models.tasklog import LogTemplate
  from airflow.utils import timezone
  from airflow.utils.log.file_task_handler import FileTaskHandler
  from airflow.utils.log.logging_mixin import ExternalLoggingMixin
  from airflow.utils.session import create_session
  from airflow.utils.state import DagRunState, TaskInstanceState
  from airflow.utils.types import DagRunType
  from airflow.www.app import create_app
  from tests.test_utils.config import conf_vars
  from tests.test_utils.db import clear_db_dags, clear_db_runs
  from tests.test_utils.decorators import dont_initialize_flask_app_submodules
  from tests.test_utils.www import client_with_login
label_desc: Use image node_id 11 for calling a global function with example usage: dag_run_with_log_filename(tis) without return types