code: def printable_graph(graph: GraphProto, prefix: str = "") -> str:
      """Display a GraphProto as a string.
  
      Args:
          graph (GraphProto): the graph to display
          prefix (string): prefix of every line
  
      Returns:
          string
      """
      content = []
      indent = prefix + "  "
      # header
      header = ["graph", graph.name]
      initializers = {t.name for t in graph.initializer}
      if len(graph.input):
          header.append("(")
          in_strs = []  # required inputs
          in_with_init_strs = (
              []
          )  # optional inputs with initializer providing default value
          for inp in graph.input:
              if inp.name not in initializers:
                  in_strs.append(printable_value_info(inp))
              else:
                  in_with_init_strs.append(printable_value_info(inp))
          if in_strs:
              content.append(prefix + " ".join(header))
              header = []
              for line in in_strs:
                  content.append(prefix + "  " + line)
          header.append(")")
  
          if in_with_init_strs:
              header.append(
                  "optional inputs with matching initializers ("
              )
              content.append(prefix + " ".join(header))
              header = []
              for line in in_with_init_strs:
                  content.append(prefix + "  " + line)
              header.append(")")
  
          # from IR 4 onwards an initializer is not required to have a matching graph input
          # so output the name, type and shape of those as well
          if len(in_with_init_strs) < len(initializers):
              graph_inputs = {i.name for i in graph.input}
              init_strs = [
                  printable_tensor_proto(i)
                  for i in graph.initializer
                  if i.name not in graph_inputs
              ]
              header.append("initializers (")
              content.append(prefix + " ".join(header))
              header = []
              for line in init_strs:
                  content.append(prefix + "  " + line)
              header.append(")")
  
      header.append("{")
      content.append(prefix + " ".join(header))
      graphs: List[GraphProto] = []
      # body
      for node in graph.node:
          contents_subgraphs = printable_node(
              node, indent, subgraphs=True
          )
          if not isinstance(contents_subgraphs[1], list):
              raise TypeError(
                  f"contents_subgraphs[1] must be an instance of {list}."
              )
          content.append(contents_subgraphs[0])
          graphs.extend(contents_subgraphs[1])
      # tail
      tail = ["return"]
      if len(graph.output):
          tail.append(
              ", ".join([f"%{out.name}" for out in graph.output])
          )
      content.append(indent + " ".join(tail))
      # closing bracket
      content.append(prefix + "}")
      for g in graphs:
          content.append("\n" + printable_graph(g))
      return "\n".join(content)
  
imports: import collections.abc
  import numbers
  import struct
  from cmath import isnan
  from typing import Any, Callable, Dict, KeysView, List, Optional, Sequence, Tuple, TypeVar, Union, cast
  import google.protobuf.message
  import numpy
  from onnx import IR_VERSION, AttributeProto, FunctionProto, GraphProto, MapProto, ModelProto, NodeProto, OperatorSetIdProto, OptionalProto, SequenceProto, SparseTensorProto, TensorProto, TensorShapeProto, TrainingInfoProto, TypeProto, ValueInfoProto, defs, mapping, subbyte
label_desc: Use image node_id 43 for calling a global function with example usage: printable_graph(graph, prefix) and returns: str