code: def test_debugprint_nitsot():
      coefficients = vector("coefficients")
      x = scalar("x")
  
      max_coefficients_supported = 10000
  
      # Generate the components of the polynomial
      components, updates = pytensor.scan(
          fn=lambda coefficient, power, free_variable: coefficient
          * (free_variable**power),
          outputs_info=None,
          sequences=[
              coefficients,
              pt.arange(max_coefficients_supported),
          ],
          non_sequences=x,
      )
      # Sum them up
      polynomial = components.sum()
  
      output_str = debugprint(
          polynomial, file="str", print_op_info=True
      )
      lines = output_str.split("\n")
  
      expected_output = """Sum{axes=None} [id A]
       └─ Scan{scan_fn, while_loop=False, inplace=none} [id B] (outer_out_nit_sot-0)
          ├─ Minimum [id C] (outer_in_nit_sot-0)
          │  ├─ Subtensor{i} [id D]
          │  │  ├─ Shape [id E]
          │  │  │  └─ Subtensor{start:} [id F] 'coefficients[0:]'
          │  │  │     ├─ coefficients [id G]
          │  │  │     └─ 0 [id H]
          │  │  └─ 0 [id I]
          │  └─ Subtensor{i} [id J]
          │     ├─ Shape [id K]
          │     │  └─ Subtensor{start:} [id L]
          │     │     ├─ ARange{dtype='int64'} [id M]
          │     │     │  ├─ 0 [id N]
          │     │     │  ├─ 10000 [id O]
          │     │     │  └─ 1 [id P]
          │     │     └─ 0 [id Q]
          │     └─ 0 [id R]
          ├─ Subtensor{:stop} [id S] (outer_in_seqs-0)
          │  ├─ Subtensor{start:} [id F] 'coefficients[0:]'
          │  │  └─ ···
          │  └─ ScalarFromTensor [id T]
          │     └─ Minimum [id C]
          │        └─ ···
          ├─ Subtensor{:stop} [id U] (outer_in_seqs-1)
          │  ├─ Subtensor{start:} [id L]
          │  │  └─ ···
          │  └─ ScalarFromTensor [id V]
          │     └─ Minimum [id C]
          │        └─ ···
          ├─ Minimum [id C] (outer_in_nit_sot-0)
          │  └─ ···
          └─ x [id W] (outer_in_non_seqs-0)
  
      Inner graphs:
  
      Scan{scan_fn, while_loop=False, inplace=none} [id B]
       ← Mul [id X] (inner_out_nit_sot-0)
          ├─ *0-<Scalar(float64, shape=())> [id Y] -> [id S] (inner_in_seqs-0)
          └─ Pow [id Z]
             ├─ *2-<Scalar(float64, shape=())> [id BA] -> [id W] (inner_in_non_seqs-0)
             └─ *1-<Scalar(int64, shape=())> [id BB] -> [id U] (inner_in_seqs-1)"""
  
      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 3 for calling a global function with example usage: test_debugprint_nitsot() without return types