code: def print_model_execution_graph(
      graph: dict[int | None, OptionalList[NodeDict]]
  ) -> None:
      """Pretty print of a model execution graph."""
      # TODO: check types
  
      def nids_as_str(nids: list[int | None]) -> str:  # type: ignore
          return ", ".join([str(nid) for nid in nids])  # type: ignore
  
      def print_node(node) -> None:
          print(
              f"""[NID: {node["nid"]:d}]
              [Layer: {node["layer"].name:20s}]
              [Inputs from: {nids_as_str(node["Xs_nids"]):20s}]
              [Outputs to: {nids_as_str(node["Ys_nids"]):20s}]"""
          )
  
      def print_input_node(node) -> None:  # node of type NodeDict?
          print(
              f"""[Layer: {node["layer"].name:20s}]
              [Outputs to: {nids_as_str(node["Ys_nids"]):20s}]"""
          )
  
      if None in graph:  # Input layers in graph have Node-ID `None`
          print("Graph input layers:")
          for input_node in graph[None]:
              print_input_node(input_node)
  
      print("Graph nodes:")
      for nid in sorted(key for key in graph if key is not None):
          if nid is None:
              continue
          print_node(graph[nid])
  
imports: from __future__ import annotations
  import inspect
  import warnings
  from abc import ABCMeta, abstractmethod
  from typing import Any, Callable
  import numpy
  import tensorflow.keras.backend
  import tensorflow.keras.layers
  import tensorflow.keras.models
  import innvestigate.backend
  import innvestigate.backend.checks
  import innvestigate.layers
  from innvestigate.backend.types import Layer, LayerCheck, Model, NodeDict, OptionalList, ReverseTensorDict, Tensor
label_desc: Use image node_id 18 for calling a global function with example usage: print_model_execution_graph(graph) and returns: str