code: def get_min_max_value(x, quant_type, quant_scheme):
      target_dim = get_target_dim(quant_type, quant_scheme)
      if target_dim is None:
          return torch.min(x), torch.max(x)
  
      indices = list(range(len(x.shape)))
      assert target_dim < len(
          indices
      ), "target_dim needs to be less than the number of dim of the tensor"
      del indices[target_dim]
  
      if TORCH_VERSION > (1, 6):
          min_val = torch.amin(x, indices, keepdims=True)
          max_val = torch.amax(x, indices, keepdims=True)
      else:
          min_val = max_val = x
          for ind in indices:
              min_val = torch.min(min_val, dim=ind, keepdim=True)[0]
              max_val = torch.max(max_val, dim=ind, keepdim=True)[0]
      return min_val, max_val
  
file_path: nni/nni/compression/utils/quantization/utils.py
imports: import torch
  from nni.common.version import TORCH_VERSION
  from .literal import QuantDtype, QuantScheme, QuantType
label_desc: Use image node_id 4 for calling a global function with example usage: get_min_max_value(x, quant_type, quant_scheme) and returns: min_val,  max_val, torch,  torch