docstr: g : graph
  h : node features
  weights : scalar edge weights
docstr_tok: ["g",":","graph","h",":","node","features","weights",":","scalar","edge","weights"]
code: def forward(self, g, h, weights):
      """
      g : graph
      h : node features
      weights : scalar edge weights
      """
      h_src, h_dst = h
      with g.local_scope():
          g.srcdata["n"] = self.act(self.Q(self.dropout(h_src)))
          g.edata["w"] = weights.float()
          g.update_all(fn.u_mul_e("n", "w", "m"), fn.sum("m", "n"))
          g.update_all(fn.copy_e("w", "m"), fn.sum("m", "ws"))
          n = g.dstdata["n"]
          ws = g.dstdata["ws"].unsqueeze(1).clamp(min=1)
          z = self.act(
              self.W(self.dropout(torch.cat([n / ws, h_dst], 1)))
          )
          z_norm = z.norm(2, 1, keepdim=True)
          z_norm = torch.where(
              z_norm == 0, torch.tensor(1.0).to(z_norm), z_norm
          )
          z = z / z_norm
          return z
  
imports: import dgl
  import dgl.function
  import dgl.nn.pytorch
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 3 for calling the WeightedSAGEConv obj's underlying member method code with example usage: obj.forward(g, h, weights) and returns: z