code: def _post_attention_pool(
      tensor: torch.Tensor,
      thw_shape: List[int],
  ) -> Tuple[torch.Tensor, List[int]]:
      B, N, L, C, T, H, W, tensor_dim = thw_shape
      thw_shape = [tensor.shape[2], tensor.shape[3], tensor.shape[4]]
      L_pooled = tensor.shape[2] * tensor.shape[3] * tensor.shape[4]
      tensor = tensor.reshape(B, N, C, L_pooled).transpose(2, 3)
      if torch.jit.is_scripting():
          tensor = _squeeze_dims_jit(tensor, tensor_dim)
      else:
          tensor = _squeeze_dims_fx(tensor, tensor_dim)
  
      return tensor, thw_shape
  
imports: from typing import List, Optional, Tuple
  import numpy
  import torch
  import torch.fx
  import torch.nn
  from torch.nn.common_types import _size_3_t
  from .drop_path import DropPath
label_desc: Use image node_id 6 for calling a global function with example usage: _post_attention_pool(tensor, thw_shape) and returns: tensor,  thw_shape