code: def forward(self, inputs, size=1):
      # inputs: [..., input_dim], normalized real world positions in [-size, size]
      # return: [..., degree^2]
  
      inputs = inputs / size  # [-1, 1]
  
      prefix_shape = list(inputs.shape[:-1])
      inputs = inputs.reshape(-1, self.input_dim)
  
      outputs = sh_encode(inputs, self.degree, inputs.requires_grad)
      outputs = outputs.reshape(prefix_shape + [self.output_dim])
  
      return outputs
  
file_path: NeMo/nemo/collections/multimodal/modules/nerf/utils/torch_ngp/shencoder.py
imports: import _shencoder
  import torch
  import torch.nn
  from torch.autograd import Function
  from torch.cuda.amp import custom_bwd, custom_fwd
label_desc: Use image node_id 3 for calling the SHEncoder obj's underlying member method code with example usage: obj.forward(inputs, size) and returns: outputs