<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def shoelace_for_area(nodes):
 r"""Compute an auxiliary "shoelace" sum used to compute area. .. note:: This is a helper for :func:`_compute_area`. Defining :math:`\left[i, j\right] = x_i y_j - y_i x_j` as a shoelace term illuminates the name of this helper. On a degree one curve, this function will return .. math:: \frac{1}{2}\left[0, 1\right]. on a degree two curve it will return .. math:: \frac{1}{6}\left(2 \left[0, 1\right] + 2 \left[1, 2\right] + \left[0, 2\right]\right) and so on. For a given :math:`\left[i, j\right]`, the coefficient comes from integrating :math:`b_{i, d}, b_{j, d}` on :math:`\left[0, 1\right]` (where :math:`b_{i, d}, b_{j, d}` are Bernstein basis polynomials). Returns: float: The computed sum of shoelace terms. Raises: .UnsupportedDegree: If the degree is not 1, 2, 3 or 4. """

    _, num_nodes = nodes.shape
    if num_nodes == 2:
        shoelace = SHOELACE_LINEAR
        scale_factor = 2.0
    elif num_nodes == 3:
        shoelace = SHOELACE_QUADRATIC
        scale_factor = 6.0
    elif num_nodes == 4:
        shoelace = SHOELACE_CUBIC
        scale_factor = 20.0
    elif num_nodes == 5:
        shoelace = SHOELACE_QUARTIC
        scale_factor = 70.0
    else:
        raise _helpers.UnsupportedDegree(num_nodes - 1, supported=(1, 2, 3, 4))

    result = 0.0
    for multiplier, index1, index2 in shoelace:
        result += multiplier * (
            nodes[0, index1] * nodes[1, index2]
            - nodes[1, index1] * nodes[0, index2]
        )

    return result / scale_factor