code: def forward(self, x):
      b, c = x.shape
      x = rearrange(x, "b c -> (b c)")
      freqs = torch.arange(
          start=0,
          end=self.num_channels // 2,
          dtype=torch.float32,
          device=x.device,
      )
      freqs = freqs / (
          self.num_channels // 2 - (1 if self.endpoint else 0)
      )
      freqs = (1 / self.max_positions) ** freqs
      x = x.ger(freqs.to(x.dtype))
      x = torch.cat([x.cos(), x.sin()], dim=1)
      x = rearrange(x, "(b c) emb_ch -> b (c emb_ch)", b=b)
      return x
  
imports: import torch
  import torch.nn
  import torchvision
  import numpy
  import torch
  from torch.nn.functional import silu
  from einops import rearrange, repeat
  from utils.general_utils import matrix_to_quaternion, quaternion_raw_multiply
  from utils.graphics_utils import fov2focal
label_desc: Use image node_id 2 for calling the PositionalEmbedding obj's underlying member method code with example usage: obj.forward(x) and returns: x