code: def forward(self, x):
      self.w = torch.matmul(
          self.att, self.basis.view(self.num_bases, -1)
      )
      self.w = self.w.view(
          self.num_relations, self.in_channels, self.out_channels
      )
  
      if x is None:
  
          def msg_func(edge):
              w = self.w.view(-1, self.out_channels)
              index = (
                  edge.data["type"] * self.in_channels + edge.src["id"]
              )
              m = w.index_select(0, index) * edge.data[
                  "norm"
              ].unsqueeze(1)
              return {"m": m}
  
      else:
          self.g.ndata["x"] = x
  
          def msg_func(edge):
              w = self.w.index_select(0, edge.data["type"])
              m = torch.bmm(edge.src["x"].unsqueeze(1), w).squeeze()
              m = m * edge.data["norm"].unsqueeze(1)
              return {"m": m}
  
      self.g.update_all(msg_func, self.rgcn_reduce)
      out = self.g.ndata.pop("x")
  
      if x is None:
          out = out + self.root
      else:
          out = out + torch.matmul(x, self.root)
  
      out = out + self.bias
      return out
  
imports: import dgl.function
  import torch
  import torch.nn.functional
  from torch.nn import Parameter
  from torch_geometric.nn.inits import uniform
label_desc: Use image node_id 4 for calling the RGCNConv obj's underlying member method code with example usage: obj.forward(x) and returns: out, dict, dict