def METHOD_NAME(self):
    visited_ambiguous = [False]
    visited_full = [False]
    class CustomTransformer(TreeForestTransformer):
        @handles_ambiguity
        def start(self, data):
            for tree in data:
                assert tree.data == 'ambiguous' or tree.data == 'full'
        def ambiguous(self, data):
            visited_ambiguous[0] = True
            assert len(data) == 3
            assert data[0].data == 'ab'
            assert data[1].data == 'bc'
            assert data[2].data == 'cd'
            return self.tree_class('ambiguous', data)
        def full(self, data):
            visited_full[0] = True
            assert len(data) == 1
            assert data[0].data == 'abcd'
            return self.tree_class('full', data)
    grammar = """
    start: ab bc cd -> ambiguous
        | abcd -> full
    !ab: "A" "B"?
    !bc: "B"? "C"?
    !cd: "C"? "D"
    !abcd: "ABCD"
    """
    l = Lark(grammar, parser='earley', ambiguity='forest')
    forest = l.parse('ABCD')
    tree = CustomTransformer(resolve_ambiguity=False).transform(forest)
    self.assertTrue(visited_ambiguous[0])
    self.assertTrue(visited_full[0])