<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def gauss_hermite_nodes(orders, sigma, mu=None):
    '''
    Computes the weights and nodes for Gauss Hermite quadrature.

    Parameters
    ----------
    orders : int, list, array
        The order of integration used in the quadrature routine
    sigma : array-like
        If one dimensional, the variance of the normal distribution being
        approximated. If multidimensional, the variance-covariance matrix of
        the multivariate normal process being approximated.

    Returns
    -------
    x : array
        Quadrature nodes
    w : array
        Quadrature weights
    '''
    if isinstance(orders, int):
        orders = [orders]

    import numpy


    if mu is None:
        mu = numpy.array( [0]*sigma.shape[0] )


    herms = [hermgauss(i) for i in orders]

    points = [ h[0]*numpy.sqrt(2) for h in herms]
    weights = [ h[1]/numpy.sqrt( numpy.pi) for h in herms]

    if len(orders) == 1:
        # Note: if sigma is 2D, x will always be 2D, even if sigma is only 1x1.
        # print(points.shape)
        x = numpy.array(points[0])*numpy.sqrt(float(sigma))
        if sigma.ndim==2:
            x = x[:,None]
        w = weights[0]
        return [x,w]

    else:
        x = cartesian( points).T

        from functools import reduce
        w = reduce( numpy.kron, weights)

        zero_columns = numpy.where(sigma.sum(axis=0)==0)[0]
        for i in zero_columns:
            sigma[i,i] = 1.0

        C = numpy.linalg.cholesky(sigma)

        x = numpy.dot(C, x) + mu[:,numpy.newaxis]

        x = numpy.ascontiguousarray(x.T)

        for i in zero_columns:
            x[:,i] =0

        return [x,w]