code: def _infer_batch_shape3d(
      input: Union[Tensor, Tuple[Tensor, Tensor]]
  ) -> torch.Size:
      r"""Infer input shape.
  
      Input may be either (tensor,) or (tensor, transform_matrix)
      """
      if isinstance(input, tuple):
          tensor = _transform_input3d(input[0])
      else:
          tensor = _transform_input3d(input)
      return tensor.shape
  
imports: from functools import wraps
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  from torch.distributions import Beta, Uniform
  from kornia.core import Tensor, as_tensor
  from kornia.geometry.boxes import Boxes
  from kornia.geometry.keypoints import Keypoints
  from kornia.utils import _extract_device_dtype
label_desc: Use image node_id 4 for calling a global function with example usage: _infer_batch_shape3d(input) and returns: tensor