code: def forward(self, g, get_all_outputs=True):
      outputs = []
      for _ in range(self.num_steps):
          self.rrn_layer(g)
          if get_all_outputs:
              outputs.append(g.ndata["h"])
      if get_all_outputs:
          outputs = torch.stack(
              outputs, 0
          )  # num_steps x n_nodes x h_dim
      else:
          outputs = g.ndata["h"]  # n_nodes x h_dim
      return outputs
  
file_path: dgl/examples/pytorch/rrn/rrn.py
imports: import dgl.function
  import torch
  from torch import nn
label_desc: Use image node_id 2 for calling the RRN obj's underlying member method code with example usage: obj.forward(g, get_all_outputs) and returns: outputs