code: def clip_boxes_to_image(
      boxes: torch.Tensor, height: int, width: int
  ) -> torch.Tensor:
      """
      Clip an array of boxes to an image with the given height and width.
      Args:
          boxes (tensor): bounding boxes to perform clipping.
              Dimension is `num boxes` x 4.
          height (int): given image height.
          width (int): given image width.
      Returns:
          clipped_boxes (tensor): the clipped boxes with dimension of
              `num boxes` x 4.
      """
      clipped_boxes = copy.deepcopy(boxes)
      clipped_boxes[:, [0, 2]] = np.minimum(
          width - 1.0, np.maximum(0.0, boxes[:, [0, 2]])
      )
      clipped_boxes[:, [1, 3]] = np.minimum(
          height - 1.0, np.maximum(0.0, boxes[:, [1, 3]])
      )
      return clipped_boxes
  
imports: import copy
  import math
  from typing import Tuple
  import numpy
  import torch
label_desc: Use image node_id 13 for calling a global function with example usage: clip_boxes_to_image(boxes, height, width) and returns: clipped_boxes