class_docstr: Parses the inputs and outputs of scan in an easy to manipulate format.
code: def __init__(
      self,
      outer_inputs,
      outer_outputs,
      _inner_inputs,
      _inner_outputs,
      info,
  ):
      self.n_steps = outer_inputs[0]
      rval = reconstruct_graph(_inner_inputs, _inner_outputs, "")
      if info["as_while"]:
          self.cond = [rval[1][-1]]
          inner_outputs = rval[1][:-1]
      else:
          self.cond = []
          inner_outputs = rval[1]
      inner_inputs = rval[0]
  
      p = 1
      q = 0
  
      n_seqs = info["n_seqs"]
      self.outer_in_seqs = outer_inputs[p : p + n_seqs]
      self.inner_in_seqs = inner_inputs[q : q + n_seqs]
      p += n_seqs
      q += n_seqs
  
      n_mit_mot = info["n_mit_mot"]
      n_mit_sot = info["n_mit_sot"]
  
      self.mit_mot_in_slices = info["tap_array"][:n_mit_mot]
      self.mit_sot_in_slices = info["tap_array"][
          n_mit_mot : n_mit_mot + n_mit_sot
      ]
  
      n_mit_mot_ins = sum(len(s) for s in self.mit_mot_in_slices)
      n_mit_sot_ins = sum(len(s) for s in self.mit_sot_in_slices)
  
      iimm = inner_inputs[q : q + n_mit_mot_ins]
      self.inner_in_mit_mot = []
      qq = 0
      for sl in self.mit_mot_in_slices:
          self.inner_in_mit_mot.append(iimm[qq : qq + len(sl)])
          qq += len(sl)
      q += n_mit_mot_ins
  
      iims = inner_inputs[q : q + n_mit_sot_ins]
      self.inner_in_mit_sot = []
      qq = 0
      for sl in self.mit_sot_in_slices:
          self.inner_in_mit_sot.append(iims[qq : qq + len(sl)])
          qq += len(sl)
      q += n_mit_sot_ins
  
      self.outer_in_mit_mot = outer_inputs[p : p + n_mit_mot]
      p += n_mit_mot
      self.outer_in_mit_sot = outer_inputs[p : p + n_mit_sot]
      p += n_mit_sot
  
      n_sit_sot = info["n_sit_sot"]
      self.outer_in_sit_sot = outer_inputs[p : p + n_sit_sot]
      self.inner_in_sit_sot = inner_inputs[q : q + n_sit_sot]
      p += n_sit_sot
      q += n_sit_sot
  
      n_shared_outs = info["n_shared_outs"]
      self.outer_in_shared = outer_inputs[p : p + n_shared_outs]
      self.inner_in_shared = inner_inputs[q : q + n_shared_outs]
      p += n_shared_outs
      q += n_shared_outs
  
      n_nit_sot = info["n_nit_sot"]
      self.outer_in_nit_sot = outer_inputs[p : p + n_nit_sot]
      p += n_nit_sot
  
      self.outer_in_non_seqs = outer_inputs[p:]
      self.inner_in_non_seqs = inner_inputs[q:]
  
      # now for the outputs
      p = 0
      q = 0
  
      self.mit_mot_out_slices = info["mit_mot_out_slices"]
      n_mit_mot_outs = info["n_mit_mot_outs"]
      self.outer_out_mit_mot = outer_outputs[p : p + n_mit_mot]
      iomm = inner_outputs[q : q + n_mit_mot_outs]
      self.inner_out_mit_mot = []
      qq = 0
      for sl in self.mit_mot_out_slices:
          self.inner_out_mit_mot.append(iomm[qq : qq + len(sl)])
          qq += len(sl)
      p += n_mit_mot
      q += n_mit_mot_outs
  
      self.outer_out_mit_sot = outer_outputs[p : p + n_mit_sot]
      self.inner_out_mit_sot = inner_outputs[q : q + n_mit_sot]
      p += n_mit_sot
      q += n_mit_sot
  
      self.outer_out_sit_sot = outer_outputs[p : p + n_sit_sot]
      self.inner_out_sit_sot = inner_outputs[q : q + n_sit_sot]
      p += n_sit_sot
      q += n_sit_sot
  
      self.outer_out_nit_sot = outer_outputs[p : p + n_nit_sot]
      self.inner_out_nit_sot = inner_outputs[q : q + n_nit_sot]
      p += n_nit_sot
      q += n_nit_sot
  
      self.outer_out_shared = outer_outputs[p : p + n_shared_outs]
      self.inner_out_shared = inner_outputs[q : q + n_shared_outs]
      p += n_shared_outs
      q += n_shared_outs
  
      assert p == len(outer_outputs)
      assert q == len(inner_outputs)
  
      self.other_info = OrderedDict()
      for k in (
          "truncate_gradient",
          "name",
          "mode",
          "destroy_map",
          "gpua",
          "as_while",
          "profile",
          "allow_gc",
      ):
          if k in info:
              self.other_info[k] = info[k]
  
imports: from __future__ import absolute_import, print_function, division
  import copy
  import logging
  import warnings
  from collections import OrderedDict
  import numpy
  import theano
  from theano.compat import izip
  from six import string_types, iteritems
  from six.moves import xrange
  from theano.compile.pfunc import rebuild_collect_shared
  from theano import gof, compat
  from theano import tensor, scalar
  from theano.tensor.basic import get_scalar_constant_value
label_desc: Use image node_id 1 to create a new scan_args object from inherited base classes: object with example: obj = scan_args(outer_inputs, outer_outputs, _inner_inputs, _inner_outputs, info)