def getMatchedNodes(tr):
    matchedLeafs = []
    for tree, outcome in zip(tr.trees, tr.targets):
        matchedLeaf = {'text' : [], 'tail' : [], 'attrib' : [], 'content' : []}
        for x in tree.iter():
            if x.text and outcome == x.text:
                matchedLeaf['text'].append(x)
            if x.tail and outcome in x.tail:
                matchedLeaf['tail'].append(x)    
            if x.attrib and any([outcome in y for y in x.attrib.values()]):
                matchedLeaf['attrib'].append(x)
        matchedLeafs.append(matchedLeaf)
    return matchedLeafs
dataset/ETHPy150Open kootenpv/sky/sky/legacy/scraper.py/getMatchedNodes/operator `in` -> `==`