parameters: (data, old_min, old_max, new_min, new_max)
return_statement: return map(ScalePoint, data)
docstring: Scale the input data so that the range old_min-old_max maps to
    new_min-new_max.
docstring_summary: Scale the input data so that the range old_min-old_max maps to
    new_min-new_max.
docstring_tokens: Scale the input data so that the range old_min - old_max maps to new_min - new_max .
function: def ScaleData(data, old_min, old_max, new_min, new_max):
    """Scale the input data so that the range old_min-old_max maps to
    new_min-new_max.
    """
    def ScalePoint(x):
      if x is None:
        return None
      return scale * x + translate
  
    if old_min == old_max:
      scale = 1
    else:
      scale = (new_max - new_min) / float(old_max - old_min)
    translate = new_min - scale * old_min
    return map(ScalePoint, data)
function_tokens: def ScaleData ( data , old_min , old_max , new_min , new_max ) : def ScalePoint ( x ) : if x is None : return None return scale * x + translate if old_min == old_max : scale = 1 else : scale = ( new_max - new_min ) / float ( old_max - old_min ) translate = new_min - scale * old_min return map ( ScalePoint , data )