def closedIntegral(l, omegas) :
    """
Let :math:`e` denote :py:obj:`len(omegas)`.
This function computes the integral of

.. math::

    \\prod_{1 \leq i \leq e} \\frac{1}{1-\\psi_i/\\omega_i} := \\sum_{j_1,...,j_e} \\prod_i \\left(\\frac{\\psi_i}{\\omega_i}\\right)^{j_i}

over :math:`\\overline{\\mathcal{M}}_{0,l + e}`.

If :math:`l + e < 3` this is just the unit class. Otherwise, we apply the string equation (see Exercise 25.2.8 in `MS book <http://www.claymath.org/library/monographs/cmim-1.pdf>`_) and simplify to find this is just

.. math::

    (\\sum_i \\frac{1}{\\omega_i})^{l + e -3}

"""
    dim = max(l + len(omegas)-3,0)
    return sum(o**(-1) for o in omegas)**dim