code: def _clip_box(tensor, box_size: Tuple[int, int]):
      assert torch.isfinite(
          tensor
      ).all(), "Box tensor contains infinite or NaN!"
      h, w = box_size
      tensor[:, 0].clamp_(min=0, max=w)
      tensor[:, 1].clamp_(min=0, max=h)
      tensor[:, 2].clamp_(min=0, max=w)
      tensor[:, 3].clamp_(min=0, max=h)
  
file_path: mmf/tools/scripts/features/frcnn/processing_image.py
imports: from typing import Tuple
  import torch
  import torch.nn.functional
  from mmf.datasets.processors.frcnn_processor import img_tensorize, ResizeShortestEdge
label_desc: Use image node_id 2 for calling a global function with example usage: _clip_box(tensor, box_size) without return types