code: def _num_value_bits(dtype: torch.dtype) -> int:
      if dtype == torch.uint8:
          return 8
      elif dtype == torch.int8:
          return 7
      elif dtype == torch.int16:
          return 15
      elif dtype == torch.int32:
          return 31
      elif dtype == torch.int64:
          return 63
      else:
          raise TypeError(
              f"Number of value bits is only defined for integer dtypes, but got {dtype}."
          )
  
imports: import math
  from typing import List, Optional
  import PIL.Image
  import torch
  from torch.nn.functional import conv2d, pad
  from torchvision import tv_tensors
  from torchvision.transforms._functional_tensor import _max_value
  from torchvision.transforms.functional import pil_to_tensor, to_pil_image
  from torchvision.utils import _log_api_usage_once
  from ._utils import _get_kernel, _register_kernel_internal
label_desc: Use image node_id 11 for calling a global function with example usage: _num_value_bits(dtype) and returns: int, int, int, int, int