code: def scale(val, src, dst):
      """
      Scale value from src range to dst range.
      If value outside bounds, it is clipped and set to
      the low or high bound of dst.
  
      Ex:
          scale(0, (0.0, 99.0), (-1.0, 1.0)) == -1.0
          scale(-5, (0.0, 99.0), (-1.0, 1.0)) == -1.0
  
      """
      if val < src[0]:
          return dst[0]
      if val > src[1]:
          return dst[1]
  
      return ((val - src[0]) / (src[1] - src[0])) * (
          dst[1] - dst[0]
      ) + dst[0]
  
file_path: ffn/ffn/utils.py
imports: import re
  import decorator
  import numpy
  import pandas
label_desc: Use image node_id 10 for calling a global function with example usage: scale(val, src, dst) and returns: unknown, dst, dst