code: def __new__(
      cls,
      data: Any,
      *,
      categories: Optional[Sequence[str]] = None,
      dtype: Optional[torch.dtype] = None,
      device: Optional[Union[torch.device, str, int]] = None,
      requires_grad: bool = False,
  ) -> OneHotLabel:
      one_hot_label = super().__new__(
          cls,
          data,
          categories=categories,
          dtype=dtype,
          device=device,
          requires_grad=requires_grad,
      )
  
      if (
          categories is not None
          and len(categories) != one_hot_label.shape[-1]
      ):
          raise ValueError()
  
      return one_hot_label
  
file_path: vision/torchvision/prototype/tv_tensors/_label.py
imports: from __future__ import annotations
  from typing import Any, Optional, Sequence, Type, TypeVar, Union
  import torch
  from torch.utils._pytree import tree_map
  from torchvision.tv_tensors._tv_tensor import TVTensor
label_desc: Use image node_id 1 for calling the OneHotLabel obj's underlying member method code with example usage: obj.__new__(cls, data) and returns: one_hot_label