code: def forward(self, x, context=None, residual=None):
      if residual is None:
          residual = x
  
      if self.input_size != self.output_size and not self.residual:
          residual = self.resample_norm(residual)
  
      x = self.fc1(x)
      if context is not None:
          context = self.context(context)
          x = x + context
      x = self.elu(x)
      x = self.fc2(x)
      x = self.gate_norm(x, residual)
      return x
  
imports: import math
  from typing import Dict, List, Tuple, Union
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the GatedResidualNetwork obj's underlying member method code with example usage: obj.forward(x, context, residual) and returns: x