<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def arr_normalize(arr, *args, **kwargs):
 """ ARGS arr array to normalize **kargs scale = <f_scale> scale the normalized output by <f_scale> DESC Given an input array, <arr>, normalize all values to range between 0 and 1. If specified in the **kwargs, optionally set the scale with <f_scale>. """

    f_max = arr.max()
    f_min = arr.min()
    f_range = f_max - f_min
    arr_shifted = arr + -f_min
    arr_norm = arr_shifted / f_range
    for key, value in kwargs.items():
        if key == 'scale': arr_norm *= value
    return arr_norm