code: def _fp32_to_fp16_with_clamp(tensor: torch.Tensor) -> torch.Tensor:
      return torch.clamp(tensor, TORCH_HALF_MIN, TORCH_HALF_MAX).half()
  
file_path: pytorch/torch/distributed/algorithms/_quantization/quantization.py
imports: import functools
  import torch
  import torch.distributed
  from enum import Enum
label_desc: Use image node_id 1 for calling a global function with example usage: _fp32_to_fp16_with_clamp(tensor) and returns: torch