def write_full_connect_layer(model_name='sas', layer_name='fullconnect',
    nrof_neurons='-1', nobias='true', activation='identity', type=
    'fullconnect', dropout='0', src_layer='none', ctc_loss=False):
    """
    Generate Python code defining a SAS deep learning fully connected layer

    Parameters
    ----------
    model_name : string, optional
       Name for deep learning model
    layer_name : string, optional
       Layer name
    nrof_neurons : string, optional
       number of output neurons
    nobias : string, optional
       omit (True) or retain (False) the bias term
    activation : string, optional
       activation function
    type : string, optional
       fully connected layer type (fullconnect or output)
    dropout : string, optional
       dropout factor (0 < dropout < 1.0)
    src_layer : string, optional
       source layer(s) for the convolution layer
    ctc_loss : boolean, optional
       specifies whether the CTC loss function is used for 
       an output layer

    Returns
    -------
    string

    """
    if type == 'fullconnect':
        out = ['   s.addLayer(model=' + repr(model_name) + ', name=' + repr
            (layer_name) + ',', '              layer=dict(type=' + repr(
            type) + ', n=' + nrof_neurons + ',', 
            '                         nobias=' + nobias + ', act=' + repr(
            activation) + ', dropout=' + dropout + '),', 
            '              srcLayers=' + src_layer + ')']
    else:
        if ctc_loss:
            loss_error = 'CTC'
        else:
            loss_error = 'AUTO'
        out = ['   s.addLayer(model=' + repr(model_name) + ', name=' + repr
            (layer_name) + ',', '              layer=dict(type=' + repr(
            type) + ', n=' + nrof_neurons + ',', 
            '                         nobias=' + nobias + ', act=' + repr(
            activation) + ',', '                         error = "' +
            loss_error + '"),', '              srcLayers=' + src_layer + ')']
    return '\n'.join(out)
