docs: def step(self, **args):
          """
          SRN.step()
          Extends network step method by automatically copying hidden
          layer activations to the context layer.
          """
          if self.sequenceType == None:
              raise AttributeError("""sequenceType not set! Use SRN.setSequenceType() """)
          # take care of any params other than layer names:
          # two ways to clear context:
          # 1. force it to right now with arg initContext = 1:
          if 'initContext' in args:
              if args['initContext']:
                  self.setContext()
              del args['initContext']
          # 2. have initContext be true
          elif self.initContext:
              self.setContext()
          # if initContext is off, then we assume user knows that,
          # so we reset the flags on all context layers:
          if self.initContext == 0:
              for context in list(self.contextLayers.values()):
                  context.activationSet = 1
          # replace all patterns
          for key in args:
              args[key] = self.replacePatterns( args[key], key )
          # Get all of the input/output layer names:
          inputBankNames = [layer.name for layer in self.layers if layer.kind == 'Input']
          outputBankNames = [layer.name for layer in self.layers if layer.kind == 'Output']
          inputBankSizes = [layer.size for layer in self.layers if layer.kind == 'Input']
          inputBankTotalSize = sum(inputBankSizes)
          inputArgSizes = [len(args[name]) for name in inputBankNames if name in args]
          inputArgTotalSize = sum(inputArgSizes)
          sequenceLength = inputArgTotalSize // inputBankTotalSize
          learning = self.learning
          totalRetvals = (0.0, 0, 0) # error, correct, total
          totalPCorrect = {}
          for step in range(sequenceLength):
              if self.verbosity >= 1 or self.interactive:
                  print("-----------------------------------Step #", step + 1)
              dict = {}
              dict.update(args) # in case context, or others
              # now, overwrite input and output, if necessary
              for name in inputBankNames:
                  if name in args:
                      patternLength = self[name].size
                      offset = step * patternLength
                      if (offset + patternLength) >= len(args[name]):
                          # if this seq is too big, use last part:
                          dict[name] = args[name][-patternLength:]
                      else:
                          # else, go to the right spot in seq:
                          dict[name] = args[name][offset:offset+patternLength]
              for name in outputBankNames:
                  if name in args:
                      patternLength = self[name].size
                      offset = step * patternLength
                      if (offset + patternLength) >= len(args[name]):
                          # if this seq is too big, use last part:
                          dict[name] = args[name][-patternLength:]
                      else:
                          # else, go to the right spot in seq:
                          dict[name] = args[name][offset:offset+patternLength]
              # get info for predicition -------------------------
              for p in self.prediction:
                  (inName, outName) = p
                  inLayer = self.getLayer(inName)
                  if not inLayer.type == 'Input':
                      raise LayerError('Prediction input layer not type \'Input\'.', inLayer.type)
                  outLayer = self.getLayer(outName)
                  if not outLayer.type == 'Output':
                      raise LayerError('Prediction output layer not type \'Output\'.', outLayer.type)
                  if step == sequenceLength - 1: # last one in sequence; what do we do?
                      start = 0 # wrap to next input vector
                      if not self._sweeping: # not in sweep, in step, no target
                          raise LayerError("Attempting to predict last item in sequence, but using step(). Use sweep() instead.")
                      else: # in a sweep, so get the next pattern if one:
                          if self.currentSweepCount == None: # last item in epoch, predict back to first pattern
                              # Train it to predict first pattern, first sequence item
                              pattern = self.getData(self.loadOrder[0])
                              for key in pattern:
                                  pattern[key] = self.replacePatterns( pattern[key], key )
                              if inName in inputBankNames:
                                  if inName in pattern:
                                      dict[outName] = pattern[inName][start:start+patternLength]
                              #dict[outName] = pattern["input"][start:start+patternLength]
                          else:
                              pattern = self.getData(self.loadOrder[self.currentSweepCount+1]) 
                              for key in pattern:
                                  pattern[key] = self.replacePatterns( pattern[key], key )
                              if inName in inputBankNames:
                                  if inName in pattern:
                                      dict[outName] = pattern[inName][start:start+patternLength]
                              #dict[outName] = pattern["input"][start:start+patternLength]
                  else: # in middle of sequence
                      start = (step + 1) * inLayer.size
                      dict[outName] = args[inName][start:start+patternLength]
              # end predicition code -----------------------------
              if step < sequenceLength - 1: # not the last one
                  if not self.learnDuringSequence:
                      self.learning = 0
              retvals = self.networkStep(**dict)
              self.learning = learning # in case we turned it off
              totalRetvals = list(map(lambda x,y: x+y, totalRetvals[:3], retvals[:3]))
              sumMerge(totalPCorrect, retvals[3])
              totalRetvals.append( totalPCorrect)
          return totalRetvals