code: def forward(
      self,
      variables: List[torch.Tensor],
      static: Optional[torch.Tensor] = None,
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      flatten = torch.cat(variables, dim=-1)
      if static is not None:
          static = static.expand_as(variables[0])
      weight = self.weight_network(flatten, static)
      weight = torch.softmax(weight.unsqueeze(-2), dim=-1)
  
      var_encodings = [
          net(var) for var, net in zip(variables, self.variable_network)
      ]
      var_encodings = torch.stack(var_encodings, dim=-1)
  
      var_encodings = torch.sum(var_encodings * weight, dim=-1)
  
      return var_encodings, weight
  
imports: from typing import List, Optional, Tuple
  import numpy
  import torch
  import torch.nn
  from pts.modules import FeatureEmbedder
label_desc: Use image node_id 2 for calling the VariableSelectionNetwork obj's underlying member method code with example usage: obj.forward(variables, static) and returns: var_encodings,  weight