code: def to_text(
      proto: Union[onnx.ModelProto, onnx.FunctionProto, onnx.GraphProto]
  ) -> str:
      if isinstance(proto, onnx.ModelProto):
          return C.model_to_text(proto.SerializeToString())
      if isinstance(proto, onnx.FunctionProto):
          return C.function_to_text(proto.SerializeToString())
      if isinstance(proto, onnx.GraphProto):
          return C.graph_to_text(proto.SerializeToString())
      raise TypeError("Unsupported argument type.")
  
imports: from typing import Union
  import onnx
  from onnx.onnx_cpp2py_export import printer
label_desc: Use image node_id 1 for calling a global function with example usage: to_text(proto) and returns: C, C, C