def METHOD_NAME(x, data_format, keepdims):
    steps_axis = [1] if data_format == "channels_last" else [2]
    res = np.apply_over_axes(np.max, x, steps_axis)
    if not keepdims:
        res = res.squeeze()
    return res