code: def squash(s, dim=1):
      sq = th.sum(s**2, dim=dim, keepdim=True)
      s_norm = th.sqrt(sq)
      s = (sq / (1.0 + sq)) * (s / s_norm)
      return s
  
file_path: dgl/tutorials/models/4_old_wines/2_capsule.py
imports: import os
  import dgl
  import matplotlib.pyplot
  import numpy
  import torch
  import torch.nn
  import torch.nn.functional
  import dgl.function
  import matplotlib.animation
  import seaborn
  import networkx
  from networkx.algorithms import bipartite
label_desc: Use image node_id 3 for calling the DGLRoutingLayer obj's underlying member method code with example usage: obj.squash(s, dim) and returns: s