Path 1: 126 calls (0.9)

Pass (35) If (34) Return (17) FunctionDef (14) Expr (11) Assign (6) For (5) With (2) TryExcept (1) TryFinally (1)

() (126)

None (126)

1def dispatch(self, node: nodes.NodeNG, *args: Any) -> Any:
2        self.node = node
3        klass = node.__class__
4        meth = self._cache.get(klass)
5        if meth is None:
6            class_name = klass.__name__
7            meth = getattr(self.visitor, "visit" + class_name, self.default)
8            self._cache[klass] = meth
9        return meth(node, *args)
            

Path 2: 14 calls (0.1)

FunctionDef (1) Pass (1) Assign (1) Return (1) If (1) For (1) Expr (1) TryExcept (1) While (1) With (1)

() (14)

None (14)

1def dispatch(self, node: nodes.NodeNG, *args: Any) -> Any:
2        self.node = node
3        klass = node.__class__
4        meth = self._cache.get(klass)
5        if meth is None:
6            class_name = klass.__name__
7            meth = getattr(self.visitor, "visit" + class_name, self.default)
8            self._cache[klass] = meth
9        return meth(node, *args)