code: def from_tensor(
      cls,
      boxes: Union[Tensor, List[Tensor]],
      validate_boxes: bool = True,
  ) -> "VideoKeypoints":
      if isinstance(boxes, (list,)) or (
          boxes.dim() != 4 or boxes.shape[-1] != 2
      ):
          raise ValueError(
              "Input box type is not yet supported. Please input an `BxTxNx2` tensor directly."
          )
  
      temporal_channel_size = boxes.size(1)
  
      # Due to some torch.jit.script bug (at least <= 1.9), you need to pass all arguments to __init__ when
      # constructing the class from inside of a method.
      out = cls(
          boxes.view(boxes.size(0) * boxes.size(1), -1, boxes.size(3))
      )
      out.temporal_channel_size = temporal_channel_size
      return out
  
imports: from typing import List, Optional, Tuple, Union, cast
  import torch
  from torch import Size
  from kornia.core import Tensor
  from kornia.geometry import transform_points
label_desc: Use image node_id 1 for calling the VideoKeypoints obj's underlying member method code with example usage: obj.from_tensor(cls, boxes, validate_boxes) and returns: out