class_docstr: Build NN graph
code: def forward(self, pos, centroids, feat=None):
      dev = pos.device
      group_idx = self.frnn(pos, centroids)
      B, N, _ = pos.shape
      glist = []
      for i in range(B):
          center = torch.zeros((N)).to(dev)
          center[centroids[i]] = 1
          src = group_idx[i].contiguous().view(-1)
          dst = (
              centroids[i]
              .view(-1, 1)
              .repeat(1, self.n_neighbor)
              .view(-1)
          )
  
          unified = torch.cat([src, dst])
          uniq, inv_idx = torch.unique(unified, return_inverse=True)
          src_idx = inv_idx[: src.shape[0]]
          dst_idx = inv_idx[src.shape[0] :]
  
          g = dgl.graph((src_idx, dst_idx))
          g.ndata["pos"] = pos[i][uniq]
          g.ndata["center"] = center[uniq]
          if feat is not None:
              g.ndata["feat"] = feat[i][uniq]
          glist.append(g)
      bg = dgl.batch(glist)
      return bg
  
imports: import dgl
  import torch
  import torch.nn
  import torch.nn.functional
  from torch.autograd import Function
  from torch.nn import Parameter
  from torch.nn.modules.utils import _single
label_desc: Use image node_id 2 for calling the FixedRadiusNNGraph obj's underlying member method code with example usage: obj.forward(pos, centroids, feat) and returns: bg