def write_convolution_layer(model_name='sas', layer_name='conv', nfilters=
    '-1', width='3', height='3', stride='1', nobias='False', activation=
    'identity', dropout='0', src_layer='none', padding='None', pad_height=
    'None', pad_width='None'):
    """
    Generate Python code defining a SAS deep learning convolution layer

    Parameters
    ----------
    model_name : string, optional
       Name for deep learning model
    layer_name : string, optional
       Layer name
    nfilters : string, optional
       number of output feature maps
    width : string, optional
       image width
    height : string, optional
       image height
    stride : string, optional
       vertical/horizontal step size in pixels
    nobias : string, optional
       omit (True) or retain (False) the bias term
    activation : string, optional
       activation function
    dropout : string, optional
       dropout factor (0 < dropout < 1.0)
    src_layer : string, optional
       source layer(s) for the convolution layer
    padding : string, optional
       symmetric zero padding value
    pad_height : string, optional
       symmetric height zero padding value
    pad_width : string, optional
        symmetric width zero padding value

    Returns
    -------
    string

    """
    if pad_height.lower() != 'none' or pad_width.lower() != 'none':
        out = ['   s.addLayer(model=' + repr(model_name) + ', name=' + repr
            (layer_name) + ',', 
            '              layer=dict(type="convolution", nfilters=' +
            nfilters + ', width=' + width + ', height=' + height + ',', 
            '                         stride=' + stride + ', nobias=' +
            nobias + ', act=' + repr(activation) + ', dropout=' + dropout +
            ', padHeight=' + pad_height + ', padWidth=' + pad_width + '),',
            '              srcLayers=' + src_layer + ')']
    else:
        out = ['   s.addLayer(model=' + repr(model_name) + ', name=' + repr
            (layer_name) + ',', 
            '              layer=dict(type="convolution", nfilters=' +
            nfilters + ', width=' + width + ', height=' + height + ',', 
            '                         stride=' + stride + ', nobias=' +
            nobias + ', act=' + repr(activation) + ', dropout=' + dropout +
            ', pad=' + padding + '),', '              srcLayers=' +
            src_layer + ')']
    return '\n'.join(out)
