code: def test_debugprint():
      x, y, z = matrices("xyz")
      e = x + y * z
      op = OpFromGraph([x, y, z], [e])
      out = op(x, y, z)
  
      output_str = debugprint(out, file="str")
      lines = output_str.split("\n")
  
      exp_res = """OpFromGraph{inline=False} [id A]
   ├─ x [id B]
   ├─ y [id C]
   └─ z [id D]
  
  Inner graphs:
  
  OpFromGraph{inline=False} [id A]
   ← Add [id E]
      ├─ *0-<Matrix(float64, shape=(?, ?))> [id F]
      └─ Mul [id G]
         ├─ *1-<Matrix(float64, shape=(?, ?))> [id H]
         └─ *2-<Matrix(float64, shape=(?, ?))> [id I]
  """
  
      for truth, out in zip(exp_res.split("\n"), lines):
          assert truth.strip() == out.strip()
  
imports: from functools import partial
  import numpy
  import pytest
  import pytensor.tensor
  from pytensor.compile import shared
  from pytensor.compile.builders import OpFromGraph
  from pytensor.compile.function import function
  from pytensor.configdefaults import config
  from pytensor.gradient import DisconnectedType, Rop, disconnected_type, grad
  from pytensor.graph.basic import equal_computations
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.null_type import NullType
  from pytensor.graph.rewriting.utils import rewrite_graph
  from pytensor.graph.utils import MissingInputError
  from pytensor.printing import debugprint
  from pytensor.tensor.basic import as_tensor
  from pytensor.tensor.math import dot, exp, sigmoid
  from pytensor.tensor.math import round
  from pytensor.tensor.math import sum
  from pytensor.tensor.random.utils import RandomStream
  from pytensor.tensor.rewriting.shape import ShapeOptimizer
  from pytensor.tensor.shape import specify_shape
  from pytensor.tensor.type import TensorType, matrices, matrix, scalar, vector, vectors
  from tests import unittest_tools
  from tests.graph.utils import MyVariable
label_desc: Use image node_id 1 for calling a global function with example usage: test_debugprint() without return types