code: def extract_node_id(node, include_label=False):
      ret = {"id": node["id"]}
      if include_label:
          ret["label"] = node["value"]["label"]
      if "children" in node:
          children = []
          for child in node["children"]:
              children.append(
                  extract_node_id(child, include_label=include_label)
              )
  
          ret["children"] = children
  
      return ret
  
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 4 for calling a global function with example usage: extract_node_id(node, include_label) and returns: ret