code: def scale_val(val, min_val, total_range, truncate_large_values=False):
      scaled_value = (val - min_val) / total_range
      if truncate_large_values:
          if scaled_value < 0:
              scaled_value = 0
          elif scaled_value > 1:
              scaled_value = 1
  
      return scaled_value
  
file_path: auto_ml/auto_ml/utils_scaling.py
imports: from sklearn.base import BaseEstimator, TransformerMixin
  from auto_ml import utils
label_desc: Use image node_id 2 for calling a global function with example usage: scale_val(val, min_val, total_range, truncate_large_values) and returns: scaled_value