code: def test_build_task_group_context_manager():
      execution_date = pendulum.parse("20200101")
      with DAG(
          "test_build_task_group_context_manager",
          start_date=execution_date,
      ) as dag:
          task1 = EmptyOperator(task_id="task1")
          with TaskGroup("group234") as group234:
              _ = EmptyOperator(task_id="task2")
  
              with TaskGroup("group34") as group34:
                  _ = EmptyOperator(task_id="task3")
                  _ = EmptyOperator(task_id="task4")
  
          task5 = EmptyOperator(task_id="task5")
          task1 >> group234
          group34 >> task5
  
      assert task1.get_direct_relative_ids(upstream=False) == {
          "group234.group34.task4",
          "group234.group34.task3",
          "group234.task2",
      }
      assert task5.get_direct_relative_ids(upstream=True) == {
          "group234.group34.task4",
          "group234.group34.task3",
      }
  
      assert dag.task_group.group_id is None
      assert dag.task_group.is_root
      assert set(dag.task_group.children.keys()) == {
          "task1",
          "group234",
          "task5",
      }
      assert group34.group_id == "group234.group34"
  
      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 2 for calling a global function with example usage: test_build_task_group_context_manager() without return types