code: def clip_boxes_to_image(boxes, size):
      height, width = size
      boxes_x = boxes[..., 0::2].clip(0, width)
      boxes_y = boxes[..., 1::2].clip(0, height)
      clipped_boxes = ivy.stack([boxes_x, boxes_y], axis=-1)
      return clipped_boxes.reshape(boxes.shape).astype(boxes.dtype)
  
file_path: ivy/ivy/functional/frontends/torchvision/ops.py
imports: import ivy
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_device_and_dtypes
label_desc: Use image node_id 4 for calling a global function with example usage: clip_boxes_to_image(boxes, size) and returns: clipped_boxes