code: def standardize_and_clip(
      tensor,
      min_value=0.0,
      max_value=1.0,
      saturation=0.1,
      brightness=0.5,
  ):
      """Standardizes and clips input tensor.
  
      Standardizes the input tensor (mean = 0.0, std = 1.0). The color saturation
      and brightness are adjusted, before tensor values are clipped to min/max
      (default: 0.0/1.0).
  
      Args:
          tensor (torch.Tensor):
          min_value (float, optional, default=0.0)
          max_value (float, optional, default=1.0)
          saturation (float, optional, default=0.1)
          brightness (float, optional, default=0.5)
  
      Shape:
          Input: :math:`(C, H, W)`
          Output: Same as the input
  
      Return:
          torch.Tensor (torch.float32): Normalised tensor with values between
              [min_value, max_value]
  
      """
  
      tensor = tensor.detach().cpu()
  
      mean = tensor.mean()
      std = tensor.std()
  
      if std == 0:
          std += 1e-7
  
      standardized = tensor.sub(mean).div(std).mul(saturation)
      clipped = standardized.add(brightness).clamp(min_value, max_value)
  
      return clipped
  
file_path: flashtorch/flashtorch/utils/__init__.py
imports: from PIL import Image
  import torchvision.transforms
  import torchvision.transforms.functional
  from .imagenet import *
label_desc: Use image node_id 4 for calling a global function with example usage: standardize_and_clip(tensor, min_value, max_value, saturation, brightness) and returns: clipped