def _tgrep_conjunction_action(_s, _l, tokens, join_char = '&'):
    # filter out the ampersand
    tokens = [x for x in tokens if x != join_char]
    # print 'relation conjunction tokens: ', tokens
    if len(tokens) == 1:
        return tokens[0]
    else:
        return (lambda ts: lambda n, m=None, l=None: all(predicate(n, m, l)
                                                         for predicate in ts))(tokens)
Builds a lambda function representing a predicate on a tree node
dataset/ETHPy150Open nltk/nltk/nltk/tgrep.py/_tgrep_conjunction_action