code: def forward(self, dist, theta, phi):
      dist = dist / self.cutoff
      rbf = torch.stack([f(dist) for f in self.bessel_funcs], dim=1)
      sbf = torch.stack([f(theta, phi) for f in self.sph_funcs], dim=1)
  
      n, k = self.num_spherical, self.num_radial
      rbf = (
          rbf.view((-1, n, k))
          .repeat_interleave(self.degreeInOrder, dim=1)
          .view((-1, n**2 * k))
      )
      sbf = sbf.repeat_interleave(k, dim=1)
      out = rbf * sbf
      return out
  
file_path: DIG/dig/threedgraph/method/comenet/ocp/utils.py
imports: import torch
  import sympy
  import numpy
  from scipy.optimize import brentq
  from scipy import special
label_desc: Use image node_id 2 for calling the torsion_emb obj's underlying member method code with example usage: obj.forward(dist, theta, phi) and returns: out