code: def write_data_to_callback(context):
      msg = (
          " ".join([str(k) for k in context["ti"].key.primary])
          + f" fired callback with pid: {os.getpid()}"
      )
      with open(os.environ.get("AIRFLOW_CALLBACK_FILE"), "a+") as f:
          f.write(msg)
  
file_path: airflow/tests/dags/test_on_failure_callback.py
imports: from __future__ import annotations
  import os
  from datetime import datetime
  from airflow.exceptions import AirflowFailException
  from airflow.models.dag import DAG
  from airflow.operators.bash import BashOperator
  from airflow.operators.python import PythonOperator
label_desc: Use image node_id 1 for calling a global function with example usage: write_data_to_callback(context) without return types