Inspected function should be called two times
        Return: self
497464
def twice(self):
        
        def check(): #pylint: disable=missing-docstring
            return super(SinonExpectation, self).calledTwice
        self.valid_list.append(check)
        return self
169717
def repeat(self, count=2):
        
        # Subtracting one from the count means the code mentioned is
        # truly repeated exactly `count` times.
        # Control().move_up().repeat(3) ==
        # Control().move_up().move_up().move_up()
        try:
            return self.__class__(''.join((
                str(self),
                self.last_code() * (count - 1),
            )))
        except TypeError as ex:
            raise TypeError(
                '`count` must be an integer. Got: {!r}'.format(count)
            ) from ex
865958
function once(fn/*: Function*/) /*: Function*/ {
    if (typeof fn !== 'function') {
        throw new TypeError('Expected a function');
    }
    return function(...args) {
        let result;
        if (fn) {
            result = fn.apply(this, args);
            fn = undefined;
        }
        return result;
    }
}
1116291
def atexit(self):
        
        funcname = self.fn.__name__
        filename = self.fn.__code__.co_filename
        lineno = self.fn.__code__.co_firstlineno
        print("")
        print("*** COVERAGE RESULTS ***")
        print("%s (%s:%s)" % (funcname, filename, lineno))
        print("function called %d times" % self.ncalls)
        print("")
        fs = FuncSource(self.fn)
        for (filename, lineno), count in self.tracer.counts.items():
            if filename != fs.filename:
                continue
            fs.mark(lineno, count)
        print(fs)
        never_executed = fs.count_never_executed()
        if never_executed:
            print("%d lines were not executed." % never_executed)
696200
def trace_inspect(self):
        
        def decorator(f):
            self.tracer.inspector = f
            return f
        return decorator
456521
async function onetime() {
    if (called) return value;

    called = 1;
    value = await fn.apply(this, arguments);
    fn = null;

    return value;
  }
820342
function once (fn) {
  var called = false;
  return function () {
    if (!called) {
      called = true;
      fn.apply(this, arguments);
    }
  }
}
1042834
def _check_times(self, min_times, max_times, step):
        '''
        
        '''
        kassert.is_int(min_times)
        kassert.is_int(max_times)
        kassert.is_int(step)
        if not((min_times >= 0) and (max_times > 0) and (max_times >= min_times) and (step > 0)):
            raise KittyException('one of the checks failed: min_times(%d)>=0, max_times(%d)>0, max_times>=min_times, step > 0' % (min_times, max_times))
1040947
function once (fn) {
  var called = false;
  return function () {
    var args = [], len = arguments.length;
    while ( len-- ) args[ len ] = arguments[ len ];

    if (called) { return }
    called = true;
    return fn.apply(this, args)
  }
}
871514
def do(self, func, *args, **kwargs):
        
        if not callable(func):
            func = getattr(self.engine.function, func)
        func(self, *args, **kwargs)
        return self
976385
def initialize_check_thread(self, check_func):
        # type: (_MultiprocessOffload, function) -> None
        
        self._check_thread = threading.Thread(target=check_func)
        self._check_thread.start()
229283
def _repeat(self, count, func):
        
        if count != 1:
            with self._qpart:
                for _ in range(count):
                    func()
        else:
            func()
1238254
def repeat(self, time, function, args = []):
        """"""
        callback_id = self.tk.after(time, self._call_wrapper, time, function, *args)
        self._callback[function] = [callback_id, True]
575116
function checkNextRequire(options) {

		if (!modulep) {
			return;
		}

		if (options.strict === false) {
			return;
		}

		// Overwrite the original wrap method
		modulep.wrap = function wrap(script) {

			var head;

			// Restore the original functions
			modulep.wrap = modulep.original_wrap;
			modulep._resolveFilename = modulep.original_resolve;

			if (options.add_wrapper !== false) {
				if (options.add_wrapper || script.slice(0, 14) != 'module.exports') {

					if (script.indexOf('__cov_') > -1 && script.indexOf('module.exports=function ') > 7) {
						// We're in coverage mode, just ignore
					} else {
						// Yes: "added_wrapper", as in "done"
						options.added_wrapper = true;

						head = 'module.exports = function(';

						if (options.arguments) {
							head += Blast.getArgumentConfiguration(options.arguments).names.join(',');
						} else {
							head += 'Blast, Collection, Bound, Obj';
						}

						head += ') {';

						script = head + script + '\n};';
					}
				}
			}

			// Add the strict wrapper for this requirement
			return modulep.strict_wrapper + script + modulep.wrapper[1];
		};

		// Overwrite the original _resolveFilename method
		modulep._resolveFilename = function _resolveFilename(request, parent, is_main) {
			try {
				return modulep.original_resolve(request, parent, is_main);
			} catch (err) {
				modulep.wrap = modulep.original_wrap;
				modulep._resolveFilename = modulep.original_resolve;
				throw err;
			}
		};
	}
1176815
def updateAfterDecorator(function):
        
        def _updateAfterDecorator(self, *args, **kwargs):
            ret = function(self, *args, **kwargs)
            self.reload()
            return ret
        return _updateAfterDecorator
110627
function onceify(f) {
  var ran, ret;
  return function() {
    return ran ? ret : (ran=true, ret=f.apply(this,arguments));
  };
}
1152895
def guarded(self, func, *args, **kwargs):
        
        try:
            return func(*args, **kwargs)
        except (EnvironmentError, error.LoggableError, xmlrpc.ERRORS) as g_exc:
            if func.__name__ not in self.ERRORS_LOGGED:
                self.LOG.warn("While calling '%s': %s" % (func.__name__, g_exc))
                self.ERRORS_LOGGED.add(func.__name__)
            return None