def METHOD_NAME(x, y, zero_points=None):
    if len(x) == 0:
        return 0
    values_zero_points = interp1d(x, y, axis=1, fill_value="extrapolate")(zero_points)
    return interp1d(zero_points, values_zero_points, axis=1, fill_value="extrapolate")(x)