code: def component_dag_content(
      components: Dict[str, "ModelComponent"]
  ) -> "ComponentJSON":
      dsk_connections = connections_from_components_map(components)
      comp_dependencies, comp_dependents, comp_funcnames = {}, {}, {}
  
      for comp_name, comp in components.items():
          functions_comp = valmap(
              functions_of, comp._flashserve_meta_.dsk
          )
          function_names_comp = {
              k: sorted(set(map(funcname, v)))
              for k, v in functions_comp.items()
          }
          comp_funcnames[comp_name] = function_names_comp
          _dependencies, _dependents = get_deps(
              comp._flashserve_meta_.dsk
          )
          _dependents = dict(_dependents)
          comp_dependencies[comp_name] = _dependencies
          comp_dependents[comp_name] = _dependents
  
      return ComponentJSON(
          component_dependencies=comp_dependencies,
          component_dependents=comp_dependents,
          component_funcnames=comp_funcnames,
          connections=dsk_connections,
      )
  
imports: from collections import defaultdict
  from dataclasses import dataclass
  from operator import attrgetter
  from typing import TYPE_CHECKING, Dict, List, Set, Tuple
  from flash.core.serve.dag.optimization import cull, functions_of, inline_functions
  from flash.core.serve.dag.rewrite import RewriteRule, RuleSet
  from flash.core.serve.dag.task import flatten, get_deps, getcycle, isdag, toposort
  from flash.core.serve.dag.utils import funcname
  from flash.core.utilities.imports import _CYTOOLZ_AVAILABLE, _PYDANTIC_AVAILABLE
label_desc: Use image node_id 7 for calling a global function with example usage: component_dag_content(components) and returns: ComponentJSON