code: def test_build_task_group():
      """
      This is an alternative syntax to use TaskGroup. It should result in the same TaskGroup
      as using context manager.
      """
      execution_date = pendulum.parse("20200101")
      dag = DAG("test_build_task_group", start_date=execution_date)
      task1 = EmptyOperator(task_id="task1", dag=dag)
      group234 = TaskGroup("group234", dag=dag)
      _ = EmptyOperator(task_id="task2", dag=dag, task_group=group234)
      group34 = TaskGroup("group34", dag=dag, parent_group=group234)
      _ = EmptyOperator(task_id="task3", dag=dag, task_group=group34)
      _ = EmptyOperator(task_id="task4", dag=dag, task_group=group34)
      task5 = EmptyOperator(task_id="task5", dag=dag)
  
      task1 >> group234
      group34 >> task5
  
      assert task_group_to_dict(dag.task_group) == EXPECTED_JSON
  
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 3 for calling a global function with example usage: test_build_task_group() without return types