def METHOD_NAME(pycore, pydefined, should_analyze, search_subscopes, followed_calls):
    if search_subscopes(pydefined):
        for scope in pydefined.get_scope().get_scopes():
            METHOD_NAME(
                pycore, scope.pyobject, should_analyze, search_subscopes, followed_calls
            )
    if should_analyze(pydefined):
        new_followed_calls = max(0, followed_calls - 1)
        return_true = lambda pydefined: True
        return_false = lambda pydefined: False
        def _follow(pyfunction):
            METHOD_NAME(
                pycore, pyfunction, return_true, return_false, new_followed_calls
            )
        visitor = SOAVisitor(pycore, pydefined, _follow if followed_calls else None)
        for child in rope.base.ast.iter_child_nodes(pydefined.get_ast()):
            visitor.visit(child)