What's the equivalent of nn.gModule (Torch) in PyTorch?

I’d like to convert a Torch code to PyTorch code. But I found that the nn.gModule could return a Module with multiple input. I want to know how to implement the same thing in PyTorch.