def clean_param(par):
    """Returns a dictionary containing the parameter's 'type',
    'name', 'desc', and an optional key 'sample'. """
    param = {'type': par[0], 'desc': par[2][1:-1]}
    index = par[1].find('(')
    if index == -1:
        param['name'] = '`%s`' % par[1]
        param['ctor'] = ''
    else:
        param['name'] = '`%s`' % par[1][:index]
        param['ctor'] = par[1][index:]
    if len(par) > 3:
        param['sample'] = par[3]
    return param