def maxcalls(ctx, f, N):
        counter = [0]
        def f_maxcalls_wrapped(*args, **kwargs):
            counter[0] += 1
            if counter[0] > N:
                raise ctx.NoConvergence("maxcalls: function evaluated %i times" % N)
            return f(*args, **kwargs)
        return f_maxcalls_wrapped
Create a spawned process.
dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/ctx_base.py/StandardBaseContext.maxcalls--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/pty.py/spawn