def create_node(type, idx, idy, Lx, Ly, Isc, topLCL, botLCL, rshunt,
    rseries, xMetalTop, yMetalTop, contact):
    """ Creates a node of the solar cell, meaning all the circuit elements at an XY location in the plane. This includes all the diodes, resistances and current sources for all the junctions at that location.

    :param type: The type of the node, 'Normal', 'Finger' or 'Bus'
    :param idx: Index with the location in the X direction
    :param idy: Index with the location in the Y direction
    :param Lx: Pixel size in the X direction
    :param Ly: Pixel size in the Y direction
    :param Isc: Array of Isc for each of the junctions
    :param topLCL: Array of resistances of the top lateral conductive layer
    :param botLCL: Array of resistances of the bottom lateral conductive layers
    :param rshunt: Array of Rshunt for each of the junctions
    :param rseries: Array of Rseries for each of the junctions
    :param xMetalTop: Resistance of the metal in the X direction
    :param yMetalTop: Resistance of the metal in the Y direction
    :param contact: Contact resistance
    :return: The node define in SPICE file as a string.
    """
    node = ''
    for j in range(len(Isc)):
        loc = str(j) + '_' + str(idx).zfill(3) + '_' + str(idy).zfill(3)
        locXR = str(j) + '_' + str(idx + 1).zfill(3) + '_' + str(idy).zfill(3)
        locYR = str(j) + '_' + str(idx).zfill(3) + '_' + str(idy + 1).zfill(3)
        if j + 1 == len(Isc):
            locLow = 0
        else:
            locLow = 't_' + str(j + 1) + '_' + str(idx).zfill(3) + '_' + str(
                idy).zfill(3)
        s = Ly / Lx
        diode1 = 'd1_{0} t_{0} b_{0} diode1_{1}\n'.format(loc, j)
        diode2 = 'd2_{0} t_{0} b_{0} diode2_{1}\n'.format(loc, j)
        rshuntJ = 'Rshunt_{0} t_{0} b_{0} {1}\n'.format(loc, rshunt[j])
        source = 'i{0} b_{0} t_{0} {1}\n'.format(loc, Isc[j])
        rbotLCLX = 'RbX{0}to{1} b_{0} b_{1} {2}\n'.format(loc, locXR, 
            botLCL[j] / s)
        rbotLCLY = 'RbY{0}to{1} b_{0} b_{1} {2}\n'.format(loc, locYR, 
            botLCL[j] * s)
        rtopLCLX = 'RtX{0}to{1} t_{0} t_{1} {2}\n'.format(loc, locXR, 
            topLCL[j] / s)
        rtopLCLY = 'RtY{0}to{1} t_{0} t_{1} {2}\n'.format(loc, locYR, 
            topLCL[j] * s)
        rseriesJ = 'Rseries{0}to{1} b_{0} {1} {2}\n'.format(loc, locLow,
            rseries[j])
        if j == 0 and type == 'Finger':
            rcontact = 'Rcontact{0} t_{0} m_{0} {1}\n'.format(loc, contact)
            rmetalX = 'RbusX{0}to{1} m_{0} m_{1} {2}\n'.format(loc, locXR, 
                xMetalTop / s)
            rmetalY = 'RbusY{0}to{1} m_{0} m_{1} {2}\n'.format(loc, locYR, 
                yMetalTop * s)
            rext = ''
        elif j == 0 and type == 'Bus':
            rcontact = 'Rcontact{0} t_{0} m_{0} {1}\n'.format(loc, contact)
            rmetalX = 'RbusX{0}to{1} m_{0} m_{1} {2}\n'.format(loc, locXR, 
                1e-16)
            rmetalY = 'RbusY{0}to{1} m_{0} m_{1} {2}\n'.format(loc, locYR, 
                1e-16)
            rext = 'Rext{0} in m_{0} {1}\n'.format(loc, 1e-16)
        else:
            rcontact = ''
            rmetalX = ''
            rmetalY = ''
            rext = ''
        if j == 0 and type in ['Finger', 'Bus']:
            output = '.PRINT DC v(t_{0}) v(b_{0}) v(m_{0})\n\n'.format(loc)
        else:
            output = '.PRINT DC v(t_{0}) v(b_{0})\n\n'.format(loc)
        node = (node + diode1 + diode2 + source + rshuntJ + rtopLCLX +
            rtopLCLY + rbotLCLX + rbotLCLY + rseriesJ + rcontact + rmetalX +
            rmetalY + rext + output)
    return node
