code: def forward(
      self, x: torch.Tensor, thw: Tuple[int, int, int]
  ) -> Tuple[torch.Tensor, Tuple[int, int, int]]:
      x, tensor_dim = _unsqueeze(x, 4, 1)
  
      # Separate the class token and reshape the input
      class_token, x = torch.tensor_split(x, indices=(1,), dim=2)
      x = x.transpose(2, 3)
      B, N, C = x.shape[:3]
      x = x.reshape((B * N, C) + thw).contiguous()
  
      # normalizing prior pooling is useful when we use BN which can be absorbed to speed up inference
      if self.norm_before_pool and self.norm_act is not None:
          x = self.norm_act(x)
  
      # apply the pool on the input and add back the token
      x = self.pool(x)
      T, H, W = x.shape[2:]
      x = x.reshape(B, N, C, -1).transpose(2, 3)
      x = torch.cat((class_token, x), dim=2)
  
      if not self.norm_before_pool and self.norm_act is not None:
          x = self.norm_act(x)
  
      x = _squeeze(x, 4, 1, tensor_dim)
      return x, (T, H, W)
  
imports: import math
  from dataclasses import dataclass
  from functools import partial
  from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple
  import torch
  import torch.fx
  import torch.nn
  from ...ops import MLP, StochasticDepth
  from ...transforms._presets import VideoClassification
  from ...utils import _log_api_usage_once
  from .._api import register_model, Weights, WeightsEnum
  from .._meta import _KINETICS400_CATEGORIES
  from .._utils import _ovewrite_named_param, handle_legacy_interface
label_desc: Use image node_id 2 for calling the Pool obj's underlying member method code with example usage: obj.forward(x, thw) and returns: x,  T,  H,  W