code: def test_fgraph_to_python_multiline_str():
      """Make sure that multiline `__str__` values are supported by `fgraph_to_python`."""
  
      x = vector("x")
      y = vector("y")
  
      class TestOp(Op):
          def __init__(self):
              super().__init__()
  
          def make_node(self, *args):
              return Apply(self, list(args), [x.type() for x in args])
  
          def perform(self, inputs, outputs):
              for i, inp in enumerate(inputs):
                  outputs[i][0] = inp[0]
  
          def __str__(self):
              return "Test\nOp()"
  
      @to_python.register(TestOp)
      def to_python_TestOp(op, **kwargs):
          def func(*args, op=op):
              return list(args)
  
          return func
  
      op1 = TestOp()
      op2 = TestOp()
  
      q, r = op1(x, y)
      outs = op2(q + r, q + r)
  
      out_fg = FunctionGraph([x, y], outs, clone=False)
      assert len(out_fg.outputs) == 2
  
      out_py = fgraph_to_python(out_fg, to_python)
  
      out_py_src = inspect.getsource(out_py)
  
      assert (
          """
      # Add(Test
      # Op().0, Test
      # Op().1)
      """
          in out_py_src
      )
  
imports: import inspect
  from functools import singledispatch
  import numpy
  from pytensor import config
  from pytensor.graph.basic import Apply
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import Op
  from pytensor.link.utils import fgraph_to_python, get_name_for_object, unique_name_generator
  from pytensor.scalar.basic import Add, float64
  from pytensor.tensor import constant
  from pytensor.tensor.elemwise import Elemwise
  from pytensor.tensor.type import scalar, vector
  from pytensor.tensor.type_other import NoneConst
label_desc: Use image node_id 6 for calling a global function with example usage: test_fgraph_to_python_multiline_str() and returns: func, Apply, str, list