def METHOD_NAME(img, input_low, input_high):
    denominator = input_high - input_low
    if denominator == 0:
        # all values are same
        if input_low == 0:
            return img  # output all values are 0
        else:
            return img / input_low  # output all values are 1
    return (img - input_low) / denominator