code: def uniform_crop(
      images: torch.Tensor,
      size: int,
      spatial_idx: int,
  ) -> torch.Tensor:
      """
      Perform uniform spatial sampling on the images and corresponding boxes.
      Args:
          images (tensor): images to perform uniform crop. The dimension is
              `channel` x `num frames` x `height` x `width`.
          size (int): size of height and weight to crop the images.
          spatial_idx (int): 0, 1, or 2 for left, center, and right crop if width
              is larger than height. Or 0, 1, or 2 for top, center, and bottom
              crop if height is larger than width.
      Returns:
          cropped (tensor): images with dimension of
              `channel` x `num frames` x `height` x `width`.
      """
      cropped, _, _ = _uniform_crop_helper(images, size, spatial_idx)
      return cropped
  
imports: import copy
  import math
  from typing import Tuple
  import numpy
  import torch
label_desc: Use image node_id 10 for calling a global function with example usage: uniform_crop(images, size, spatial_idx) and returns: cropped