code: def proc_fvals(self, fvals):
      
      inputs = self.inputs
      outputs = self.outputs
  
      # Move data to the next sub-graph for the next step
      cur = 0
      for i in range(len(inputs)-1):
        if not self.active_gpus[i]:
          self.next_vals[i+1] = None
          continue
        self.next_vals[i+1] = OrderedDict()
        for k in outputs[i]:
          self.next_vals[i+1][k] = fvals[cur]
          cur += 1
        if i == 0:
          self.next_vals[0] = None
  
      # Return the output of the last sub-graph
      last_fvals = OrderedDict()
      if self.active_gpus[-1]:
        assert cur+len(outputs[-1]) == len(fvals)
        for k in outputs[-1]:
          last_fvals[k] = fvals[cur]
          cur += 1
      return last_fvals
docs: Postprocess the outputs of the Session.run(). Move the outputs of
      sub-graphs to next ones and return the output of the last sub-graph.
  
      :param fvals: A list of fetched values returned by Session.run()
      :return: A dictionary of fetched values returned by the last sub-graph.