code: def _posterize(video: torch.Tensor, factor: float, **kwargs):
      """
      Posterize an image by reducing the number of bits for each color channel.
  
      Args:
          video (torch.Tensor): Video tensor with shape (T, C, H, W).
          factor (float): The number of bits to keep for each channel (0-8).
      """
      if factor >= 8:
          return video
      if video.dtype != torch.uint8:
          video_type = video.dtype
          video = (video * 255).to(torch.uint8)
          return (
              torchvision.transforms.functional.posterize(video, factor)
              / 255
          ).to(video_type)
      return torchvision.transforms.functional.posterize(video, factor)
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  import torchvision
  from torch import Tensor
  from torchvision.transforms.functional import InterpolationMode
label_desc: Use image node_id 11 for calling a global function with example usage: _posterize(video, factor) and returns: torchvision, video, unknown