def test_count(self):
        pred_str = """foo > 12 and bar != 0 or not test and
name matches '^test$' and list contains elem and foo > 20
"""
        p1 = predicate.Predicate(pred_str)
        count, names = merge.count_expressions(p1.ast)

        assert len(count) == 5
        assert ("Literal", "test") in names

        k = ("CompareOperator", "order", ("Literal", "foo"), ("Number", "static"))
        assert k in names
        assert count[k] == 2
dataset/ETHPy150Open armon/pypred/tests/unit/test_merge.py/TestMerge.test_count/original