code: def _scale_and_clip(ratio, low, high):
      """Scale ratio values to [0, 1] and clip values outside this range."""
      scaled = (ratio - low) / (high - low)
      scaled.data = da.clip(scaled.data, 0, 1)
      return scaled
  
file_path: satpy/satpy/enhancements/atmosphere.py
imports: import datetime
  import dask.array
  import xarray
label_desc: Use image node_id 2 for calling a global function with example usage: _scale_and_clip(ratio, low, high) and returns: scaled