def filter(self, context):
        p1 = re.compile('\(\)?$')
        p2 = re.compile('\(.*\)')
        for candidate in [
                x for x in context['candidates']
                if not p1.search(x['word']) and
                (('abbr' in x and p2.search(x['abbr'])) or
                 ('info' in x and p2.search(x['info'])))]:
            candidate['word'] += '('
        return context['candidates']
dataset/ETHPy150Open Shougo/deoplete.nvim/rplugin/python3/deoplete/filters/converter_auto_paren.py/Filter.filter/original