code: def __new__(
      cls,
      data: Any,
      *,
      dtype: Optional[torch.dtype] = None,
      device: Optional[Union[torch.device, str, int]] = None,
      requires_grad: bool = False,
  ) -> EncodedData:
      tensor = cls._to_tensor(
          data, dtype=dtype, device=device, requires_grad=requires_grad
      )
      # TODO: warn / bail out if we encounter a tensor with shape other than (N,) or with dtype other than uint8?
      return cls._wrap(tensor)
  
file_path: vision/torchvision/prototype/datasets/utils/_encoded.py
imports: from __future__ import annotations
  import os
  import sys
  from typing import Any, BinaryIO, Optional, Tuple, Type, TypeVar, Union
  import PIL.Image
  import torch
  from torchvision.prototype.utils._internal import fromfile, ReadOnlyTensorBuffer
  from torchvision.tv_tensors._tv_tensor import TVTensor
label_desc: Use image node_id 2 for calling the EncodedData obj's underlying member method code with example usage: obj.__new__(cls, data) and returns: cls