code: def test_input_pair():
      class Two(nn.Module):
          def __init__(self):
              super().__init__()
              self.fc_a = nn.Linear(1, 1)
              self.fc_b = nn.Linear(1, 1)
  
          def forward(self, a_and_b):
              a, b = a_and_b
              return (self.fc_a(a), self.fc_b(b))
  
      model = nn.Sequential(Two())
      model = Pipe(model, balance=[1], devices=["cpu"], chunks=2)
  
      a = torch.rand(10, 1, requires_grad=True)
      b = torch.rand(10, 1, requires_grad=True)
  
      a_out, b_out = model((a, b))
      loss = (a_out + b_out).mean()
      loss.backward()
  
      assert a.grad is not None
      assert b.grad is not None
  
imports: from collections import OrderedDict
  from copy import deepcopy
  import time
  import pytest
  import torch
  from torch import nn
  from fairscale.nn.pipe import Pipe
label_desc: Use image node_id 18 for calling a global function with example usage: test_input_pair() and returns: self,  self