code: def test_scan_debugprint4():
      def fn(a_m2, a_m1, b_m2, b_m1):
          return a_m1 + a_m2, b_m1 + b_m2
  
      a0 = theano.shared(np.arange(2, dtype="int64"))
      b0 = theano.shared(np.arange(2, dtype="int64"))
  
      (a, b), _ = theano.scan(
          fn,
          outputs_info=[
              {"initial": a0, "taps": [-2, -1]},
              {"initial": b0, "taps": [-2, -1]},
          ],
          n_steps=5,
      )
  
      final_result = a + b
      output_str = theano.printing.debugprint(final_result, file="str")
      lines = output_str.split("\n")
  
      expected_output = """Elemwise{add,no_inplace} [id A] ''
       |Subtensor{int64::} [id B] ''
       | |for{cpu,scan_fn}.0 [id C] ''
       | | |TensorConstant{5} [id D]
       | | |IncSubtensor{Set;:int64:} [id E] ''
       | | | |AllocEmpty{dtype='int64'} [id F] ''
       | | | | |Elemwise{add,no_inplace} [id G] ''
       | | | |   |TensorConstant{5} [id D]
       | | | |   |Subtensor{int64} [id H] ''
       | | | |     |Shape [id I] ''
       | | | |     | |Subtensor{:int64:} [id J] ''
       | | | |     |   |<TensorType(int64, vector)> [id K]
       | | | |     |   |Constant{2} [id L]
       | | | |     |Constant{0} [id M]
       | | | |Subtensor{:int64:} [id J] ''
       | | | |ScalarFromTensor [id N] ''
       | | |   |Subtensor{int64} [id H] ''
       | | |IncSubtensor{Set;:int64:} [id O] ''
       | |   |AllocEmpty{dtype='int64'} [id P] ''
       | |   | |Elemwise{add,no_inplace} [id Q] ''
       | |   |   |TensorConstant{5} [id D]
       | |   |   |Subtensor{int64} [id R] ''
       | |   |     |Shape [id S] ''
       | |   |     | |Subtensor{:int64:} [id T] ''
       | |   |     |   |<TensorType(int64, vector)> [id U]
       | |   |     |   |Constant{2} [id V]
       | |   |     |Constant{0} [id W]
       | |   |Subtensor{:int64:} [id T] ''
       | |   |ScalarFromTensor [id X] ''
       | |     |Subtensor{int64} [id R] ''
       | |Constant{2} [id Y]
       |Subtensor{int64::} [id Z] ''
         |for{cpu,scan_fn}.1 [id C] ''
         |Constant{2} [id BA]
  
      Inner graphs of the scan ops:
  
      for{cpu,scan_fn}.0 [id C] ''
       >Elemwise{add,no_inplace} [id BB] ''
       > |<TensorType(int64, scalar)> [id BC] -> [id E]
       > |<TensorType(int64, scalar)> [id BD] -> [id E]
       >Elemwise{add,no_inplace} [id BE] ''
       > |<TensorType(int64, scalar)> [id BF] -> [id O]
       > |<TensorType(int64, scalar)> [id BG] -> [id O]
  
      for{cpu,scan_fn}.1 [id C] ''
       >Elemwise{add,no_inplace} [id BB] ''
       >Elemwise{add,no_inplace} [id BE] ''"""
  
      for truth, out in zip(expected_output.split("\n"), lines):
          assert truth.strip() == out.strip()
  
imports: from __future__ import absolute_import, print_function, division
  import logging
  from nose.plugins.skip import SkipTest
  import numpy
  from six.moves import StringIO
  import theano
  import theano.tensor
  from theano.printing import min_informative_str, debugprint
label_desc: Use image node_id 10 for calling a global function with example usage: test_scan_debugprint4() and returns: unknown,  unknown