code: def __init__(
      self, in_nodes, out_nodes, f_size, batch_size=0, device="cpu"
  ):
      super(DGLRoutingLayer, self).__init__()
      self.batch_size = batch_size
      self.g = init_graph(in_nodes, out_nodes, f_size, device=device)
      self.in_nodes = in_nodes
      self.out_nodes = out_nodes
      self.in_indx = list(range(in_nodes))
      self.out_indx = list(range(in_nodes, in_nodes + out_nodes))
      self.device = device
  
file_path: dgl/examples/pytorch/capsule/DGLRoutingLayer.py
imports: import dgl
  import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 to create a new DGLRoutingLayer object from inherited base classes: nn with example: obj = DGLRoutingLayer(in_nodes, out_nodes, f_size, batch_size, device)