code: def test_scan_debugprint1():
      k = tensor.iscalar("k")
      A = tensor.dvector("A")
  
      # Symbolic description of the result
      result, updates = theano.scan(
          fn=lambda prior_result, A: prior_result * A,
          outputs_info=tensor.ones_like(A),
          non_sequences=A,
          n_steps=k,
      )
  
      final_result = result[-1]
      output_str = theano.printing.debugprint(final_result, file="str")
      lines = output_str.split("\n")
  
      expected_output = """Subtensor{int64} [id A] ''
       |Subtensor{int64::} [id B] ''
       | |for{cpu,scan_fn} [id C] ''
       | | |k [id D]
       | | |IncSubtensor{Set;:int64:} [id E] ''
       | | | |AllocEmpty{dtype='float64'} [id F] ''
       | | | | |Elemwise{add,no_inplace} [id G] ''
       | | | | | |k [id D]
       | | | | | |Subtensor{int64} [id H] ''
       | | | | |   |Shape [id I] ''
       | | | | |   | |Rebroadcast{0} [id J] ''
       | | | | |   |   |InplaceDimShuffle{x,0} [id K] ''
       | | | | |   |     |Elemwise{second,no_inplace} [id L] ''
       | | | | |   |       |A [id M]
       | | | | |   |       |InplaceDimShuffle{x} [id N] ''
       | | | | |   |         |TensorConstant{1.0} [id O]
       | | | | |   |Constant{0} [id P]
       | | | | |Subtensor{int64} [id Q] ''
       | | | |   |Shape [id R] ''
       | | | |   | |Rebroadcast{0} [id J] ''
       | | | |   |Constant{1} [id S]
       | | | |Rebroadcast{0} [id J] ''
       | | | |ScalarFromTensor [id T] ''
       | | |   |Subtensor{int64} [id H] ''
       | | |A [id M]
       | |Constant{1} [id U]
       |Constant{-1} [id V]
  
      Inner graphs of the scan ops:
  
      for{cpu,scan_fn} [id C] ''
       >Elemwise{mul,no_inplace} [id W] ''
       > |<TensorType(float64, vector)> [id X] -> [id E]
       > |A_copy [id Y] -> [id M]"""
  
      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 7 for calling a global function with example usage: test_scan_debugprint1() without return types