def METHOD_NAME(width_in, max_width_out, unused_lsbs, lsb, operation, start_value=0):
    input_scale_factor = 2**unused_lsbs * lsb
    scale_factor = (2**max_width_out - 1) / max([abs(operation(input_scale_factor * (i + 0.5) + start_value))
                                                 for i in range(2**width_in)])
    return scale_factor