class_docstr: Runs a graph with sub-graphs that need to run sequentially. Each sub-graph
  takes its inputs from the outputs of the previous sub-graph.
class_docstr_tok: ["Runs","a","graph","with","sub-graphs","that","need","to","run","sequentially",".","Each","sub-graph","takes","its","inputs","from","the","outputs","of","the","previous","sub-graph","."]
code: def assert_inputs_outputs(self):
      inputs = self.inputs
      outputs = self.outputs
      assert len(inputs) == len(
          outputs
      ), "Inputs and Outputs should match in length."
      for i in range(len(inputs)):
          device = inputs[i].values()[0].device
          for _k, v in inputs[i].iteritems():
              assert (
                  v.device == device
              ), "Inputs should be on the same device."
          for _k, v in outputs[i].iteritems():
              assert (
                  v.device == device
              ), "Outputs should be on the same device."
          if i > 0:
              ikeys = inputs[i].keys()
              okeys = outputs[i - 1].keys()
              # The actual requirement is looser, only the last output keys
              # should always be returned in the same order.
              assert all(
                  ikeys[j] == okeys[j] for j in range(len(ikeys))
              ), "Inputs and outputs keys should be in the same order."
  
imports: from collections import OrderedDict
label_desc: Use image node_id 2 for calling the RunnerMultiGPU obj's underlying member method code with example usage: obj.assert_inputs_outputs() without return types