def nodeAndFrameCounts(self, reasoner, frame):
        allFrames = set()
        toCheck = [frame]
        while toCheck:
            frameToCheck = toCheck.pop()
            if frameToCheck not in allFrames:
                allFrames.add(frameToCheck)
                for subframe in reasoner.subframesFor(frameToCheck).values():
                    toCheck.append(subframe)

        reachableFrames = len(allFrames)
        allFrameCount = reasoner.totalFrameCount()
        badApplyNodes = 0

        for f in allFrames:
            for n in f.unknownApplyNodes():
                badApplyNodes += 1

        return badApplyNodes, reachableFrames, reasoner.totalFrameCount()
dataset/ETHPy150Open ufora/ufora/ufora/FORA/Reasoner/SimpleForwardReasoner_test.py/TestSimpleForwardReasoner.nodeAndFrameCounts/original