def _call(callback, args=[], kwargs={}):
    if not hasattr(callback, '_max_calls'):
        callback._max_calls = None

    # None implies no callback limit
    if callback._max_calls is None:
        return _call_partial(callback, *args, **kwargs)

    # Should the signal be disconnected?
    if callback._max_calls <= 0:
        return disconnect(callback)

    callback._max_calls -= 1

    return _call_partial(callback, *args, **kwargs)
Prepend the namespace to a given file structure
dataset/ETHPy150Open shaunduncan/smokesignal/smokesignal.py/_call--crossover with--dataset/ETHPy150Open blue-yonder/pyscaffold/pyscaffold/structure.py/add_namespace