WeightedAttention uses a SimpleNetwork for gate_nn and another one for message_nn.
The usage of these modules is shown in WeightedAttention.forward.
I don’t know, how scatter_max and scatter_add are implemented, but the usage of the SimpleNetwork modules is:
gate = self.gate_nn(fea)
...
fea = self.message_nn(fea)
...

SimpleNetwork uses an nn.ModulesList with several linear layers, another module list to store the activation functions, as well as a final linear layer.