class_docstr: Test flow to test @pytorch_parallel.
class_docstr_tok: ["Test","flow","to","test","@","pytorch_parallel","."]
docstr: Check the validity of the parallel execution.
docstr_tok: ["Check","the","validity","of","the","parallel","execution","."]
code: def multinode_end(self, inputs):
      """
      Check the validity of the parallel execution.
      """
      j = 0
      for input in inputs:
          assert input.node_index == j
          assert input.num_nodes == self.num_parallel
          assert input.reduced_tensor_value == sum(
              range(1, input.num_nodes + 1)
          )
          j += 1
      assert j == self.num_parallel
      self.next(self.end)
  
imports: from metaflow import FlowSpec, step, batch, current, pytorch_parallel, Parameter
label_desc: Use image node_id 3 for calling the PytorchParallelTest obj's underlying member method code with example usage: obj.multinode_end(inputs) without return types