code: def test_task_group_edge_modifier_chain():
      from airflow.models.baseoperator import chain
      from airflow.utils.edgemodifier import Label
  
      with DAG(
          dag_id="test", start_date=pendulum.DateTime(2022, 5, 20)
      ) as dag:
          start = EmptyOperator(task_id="sleep_3_seconds")
  
          with TaskGroup(group_id="group1") as tg:
              t1 = EmptyOperator(task_id="dummy1")
              t2 = EmptyOperator(task_id="dummy2")
  
          t3 = EmptyOperator(task_id="echo_done")
  
      # The case we are testing for is when a Label is inside a list -- meaning that we do tg.set_upstream
      # instead of label.set_downstream
      chain(start, [Label("branch three")], tg, t3)
  
      assert start.downstream_task_ids == {t1.node_id, t2.node_id}
      assert t3.upstream_task_ids == {t1.node_id, t2.node_id}
      assert tg.upstream_task_ids == set()
      assert tg.downstream_task_ids == {t3.node_id}
      # Check that we can perform a topological_sort
      dag.topological_sort()
  
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 30 for calling a global function with example usage: test_task_group_edge_modifier_chain() without return types