code: def test_debugprint_mitsot():
      def fn(a_m2, a_m1, b_m2, b_m1):
          return a_m1 + a_m2, b_m1 + b_m2
  
      a0 = pytensor.shared(np.arange(2, dtype="int64"))
      b0 = pytensor.shared(np.arange(2, dtype="int64"))
  
      (a, b), _ = pytensor.scan(
          fn,
          outputs_info=[
              {"initial": a0, "taps": [-2, -1]},
              {"initial": b0, "taps": [-2, -1]},
          ],
          n_steps=5,
      )
  
      final_result = a + b
      output_str = debugprint(
          final_result, file="str", print_op_info=True
      )
      lines = output_str.split("\n")
  
      expected_output = """Add [id A]
       ├─ Subtensor{start:} [id B]
       │  ├─ Scan{scan_fn, while_loop=False, inplace=none}.0 [id C] (outer_out_mit_sot-0)
       │  │  ├─ 5 [id D] (n_steps)
       │  │  ├─ SetSubtensor{:stop} [id E] (outer_in_mit_sot-0)
       │  │  │  ├─ AllocEmpty{dtype='int64'} [id F]
       │  │  │  │  └─ Add [id G]
       │  │  │  │     ├─ 5 [id D]
       │  │  │  │     └─ Subtensor{i} [id H]
       │  │  │  │        ├─ Shape [id I]
       │  │  │  │        │  └─ Subtensor{:stop} [id J]
       │  │  │  │        │     ├─ <Vector(int64, shape=(?,))> [id K]
       │  │  │  │        │     └─ 2 [id L]
       │  │  │  │        └─ 0 [id M]
       │  │  │  ├─ Subtensor{:stop} [id J]
       │  │  │  │  └─ ···
       │  │  │  └─ ScalarFromTensor [id N]
       │  │  │     └─ Subtensor{i} [id H]
       │  │  │        └─ ···
       │  │  └─ SetSubtensor{:stop} [id O] (outer_in_mit_sot-1)
       │  │     ├─ AllocEmpty{dtype='int64'} [id P]
       │  │     │  └─ Add [id Q]
       │  │     │     ├─ 5 [id D]
       │  │     │     └─ Subtensor{i} [id R]
       │  │     │        ├─ Shape [id S]
       │  │     │        │  └─ Subtensor{:stop} [id T]
       │  │     │        │     ├─ <Vector(int64, shape=(?,))> [id U]
       │  │     │        │     └─ 2 [id V]
       │  │     │        └─ 0 [id W]
       │  │     ├─ Subtensor{:stop} [id T]
       │  │     │  └─ ···
       │  │     └─ ScalarFromTensor [id X]
       │  │        └─ Subtensor{i} [id R]
       │  │           └─ ···
       │  └─ 2 [id Y]
       └─ Subtensor{start:} [id Z]
          ├─ Scan{scan_fn, while_loop=False, inplace=none}.1 [id C] (outer_out_mit_sot-1)
          │  └─ ···
          └─ 2 [id BA]
  
      Inner graphs:
  
      Scan{scan_fn, while_loop=False, inplace=none} [id C]
       ← Add [id BB] (inner_out_mit_sot-0)
          ├─ *1-<Scalar(int64, shape=())> [id BC] -> [id E] (inner_in_mit_sot-0-1)
          └─ *0-<Scalar(int64, shape=())> [id BD] -> [id E] (inner_in_mit_sot-0-0)
       ← Add [id BE] (inner_out_mit_sot-1)
          ├─ *3-<Scalar(int64, shape=())> [id BF] -> [id O] (inner_in_mit_sot-1-1)
          └─ *2-<Scalar(int64, shape=())> [id BG] -> [id O] (inner_in_mit_sot-1-0)"""
  
      for truth, out in zip(expected_output.split("\n"), lines):
          assert truth.strip() == out.strip()
  
file_path: pytensor/tests/scan/test_printing.py
imports: import numpy
  import pytest
  import pytensor
  import pytensor.tensor
  from pytensor.configdefaults import config
  from pytensor.graph.fg import FunctionGraph
  from pytensor.printing import debugprint, pydot_imported, pydotprint
  from pytensor.tensor.type import dvector, iscalar, scalar, vector
label_desc: Use image node_id 5 for calling a global function with example usage: test_debugprint_mitsot() and returns: unknown,  unknown