def _lorenz_curve_integrator(lc_pts, method):
    """Calculates the area under a Lorenz curve.

    Notes
    -----
    Could be utilized for integrating other simple, non-pathological
    "functions" where width of the trapezoids is constant.

    """
    x, y = lc_pts
    dx = 1 / x.shape[0]
    if method == 'trapezoids':
        h_0 = 0.0
        h_n = y[-1]
        sum_hs = y[:-1].sum()
        return dx * ((h_0 + h_n) / 2 + sum_hs)
    elif method == 'rectangles':
        return dx * y.sum()
    else:
        raise ValueError(
            "Method '%s' not implemented. Available methods: 'rectangles', 'trapezoids'."
             % method)
