def set_range(im, range_set=[0, 1]):
    """
    Set display range of the input image to a given value range (norm_range).
    """
    im[im<range_set[0]] = range_set[0]
    im[im>range_set[1]] = range_set[1]
    return im