code: def make_task(name, type_="classic"):
      if type_ == "classic":
          return BashOperator(task_id=name, bash_command="echo 1")
  
      else:
  
          @task_decorator
          def my_task():
              pass
  
          return my_task.override(task_id=name)()
  
imports: from __future__ import annotations
  from datetime import timedelta
  import pendulum
  import pytest
  from airflow.decorators import dag, setup, task, task_group, teardown
  from airflow.exceptions import TaskAlreadyInTaskGroup
  from airflow.models.baseoperator import BaseOperator
  from airflow.models.dag import DAG
  from airflow.models.xcom_arg import XComArg
  from airflow.operators.bash import BashOperator
  from airflow.operators.empty import EmptyOperator
  from airflow.operators.python import PythonOperator
  from airflow.utils.dag_edges import dag_edges
  from airflow.utils.task_group import TaskGroup, task_group_to_dict
  from tests.models import DEFAULT_DATE
label_desc: Use image node_id 1 for calling a global function with example usage: make_task(name, type_) and returns: BashOperator, my_task