code: def subdag(parent_dag_name, child_dag_name, args):
      """
      Create a subdag.
      """
      dag_subdag = DAG(
          dag_id=f"{parent_dag_name}.{child_dag_name}",
          default_args=args,
          schedule="@daily",
      )
  
      for i in range(2):
          EmptyOperator(
              task_id=f"{child_dag_name}-task-{i + 1}",
              default_args=args,
              dag=dag_subdag,
          )
  
      return dag_subdag
  
imports: from __future__ import annotations
  import warnings
  from datetime import datetime, timedelta
  from airflow.models.dag import DAG
  from airflow.operators.empty import EmptyOperator
  from airflow.operators.subdag import SubDagOperator
label_desc: Use image node_id 1 for calling a global function with example usage: subdag(parent_dag_name, child_dag_name, args) and returns: dag_subdag