code: def to_tensor(self, mode: Optional[str] = None) -> torch.Tensor | list[torch.Tensor]:  # type: ignore[override]
      out = super().to_tensor(mode, as_padded_sequence=False)
      if isinstance(out, Tensor):
          return out.view(
              -1, self.temporal_channel_size, *out.shape[1:]
          )
      # If returns a list of boxes.
      return [
          _out.view(-1, self.temporal_channel_size, *_out.shape[1:])
          for _out in out
      ]
  
imports: from __future__ import annotations
  from typing import Optional, cast
  import torch
  from torch import Size
  from kornia.core import Tensor, stack, zeros
  from kornia.geometry.bbox import validate_bbox
  from kornia.geometry.linalg import transform_points
  from kornia.utils import eye_like
label_desc: Use image node_id 2 for calling the VideoBoxes obj's underlying member method code with example usage: obj.to_tensor(mode) and returns: unknown, out