Helper function for searching keys from keyserver

def _search_keys(text, keyserver, user=None):
    '''
    Helper function for searching keys from keyserver
    '''
    gpg = _create_gpg(user)
    if keyserver:
        _keys = gpg.search_keys(text, keyserver)
    else:
        _keys = gpg.search_keys(text)
    return _keys