code: def my_py_command(params, test_mode=None, task=None):
      """
      Print out the "foo" param passed in via
      `airflow tasks test example_passing_params_via_test_command run_this <date>
      -t '{"foo":"bar"}'`
      """
      if test_mode:
          print(
              f" 'foo' was passed in via test={test_mode} command : kwargs[params][foo] = {task.params['foo']}"
          )
      # Print out the value of "miff", passed in below via the Python Operator
      print(f" 'miff' was passed in via task params = {params['miff']}")
      return 1
  
file_path: airflow/airflow/example_dags/example_passing_params_via_test_command.py
imports: from __future__ import annotations
  import datetime
  import os
  import textwrap
  import pendulum
  from airflow.decorators import task
  from airflow.models.dag import DAG
  from airflow.operators.bash import BashOperator
label_desc: Use image node_id 1 for calling a global function with example usage: my_py_command(params, test_mode, task) and returns: int