code: def test_SpatioTemporalClsPositionalEncoding(self):
      # Test with cls token.
      batch_dim = 4
      dim = 16
      video_shape = (1, 2, 4)
      video_sum = video_shape[0] * video_shape[1] * video_shape[2]
      has_cls = True
      model = SpatioTemporalClsPositionalEncoding(
          embed_dim=dim,
          patch_embed_shape=video_shape,
          has_cls=has_cls,
      )
      fake_input = torch.rand(batch_dim, video_sum, dim)
      output = model(fake_input)
      output_gt_shape = (batch_dim, video_sum + 1, dim)
      self.assertEqual(tuple(output.shape), output_gt_shape)
  
file_path: pytorchvideo/tests/test_layers_positional_encoding.py
imports: import itertools
  import math
  import unittest
  import torch
  from pytorchvideo.layers import PositionalEncoding, SpatioTemporalClsPositionalEncoding
label_desc: Use image node_id 4 for calling the TestPositionalEncoding obj's underlying member method code with example usage: obj.test_SpatioTemporalClsPositionalEncoding() without return types