code: def forward(self, h, x, mess_graph):
      mask = torch.ones(h.size(0), 1)
      mask[0] = 0  # first vector is padding
      mask = create_var(mask)
      for it in range(self.depth):
          h_nei = index_select_ND(h, 0, mess_graph)
          sum_h = h_nei.sum(dim=1)
          z_input = torch.cat([x, sum_h], dim=1)
          z = F.sigmoid(self.W_z(z_input))
  
          r_1 = self.W_r(x).view(-1, 1, self.hidden_size)
          r_2 = self.U_r(h_nei)
          r = F.sigmoid(r_1 + r_2)
  
          gated_h = r * h_nei
          sum_gated_h = gated_h.sum(dim=1)
          h_input = torch.cat([x, sum_gated_h], dim=1)
          pre_h = torch.tanh(self.W_h(h_input))
          h = (1.0 - z) * sum_h + z * pre_h
          h = h * mask
  
      return h
  
file_path: DIG/dig/ggraph/method/JTVAE/fast_jtnn/jtnn_enc.py
imports: import torch
  import torch.nn
  import torch.nn.functional
  from .mol_tree import Vocab, MolTree
  from .nnutils import create_var, index_select_ND
label_desc: Use image node_id 2 for calling the GraphGRU obj's underlying member method code with example usage: obj.forward(h, x, mess_graph) and returns: h