def METHOD_NAME(time_point, callbacks=None):
    """
    Advance the simulation until `time_point` (in ms).
    `callbacks` is an optional list of callables, each of which should
    accept the current time as an argument, and return the next time it
    wishes to be called.
    ``run_until()`` and ``run()`` may be combined freely. See the
    documentation of the ``run()`` function for further information.
    """
    now = simulator.state.t
    if time_point - now < -simulator.state.dt / 2.0:  # allow for floating point error
        raise ValueError("Time %g is in the past (current time %g)" % (time_point, now))
    if callbacks:
        callback_events = [(callback(simulator.state.t), callback)
                           for callback in callbacks]
        while simulator.state.t + 1e-9 < time_point:
            callback_events.sort(key=lambda cbe: cbe[0], reverse=True)
            next, callback = callback_events.pop()
            # collapse multiple events that happen within the same timestep
            active_callbacks = [callback]
            while len(callback_events) > 0 and\
                    abs(next - callback_events[-1][0]) < simulator.state.dt:
                active_callbacks.append(callback_events.pop()[1])
            next = min(next, time_point)
            simulator.state.METHOD_NAME(next)
            callback_events.extend((callback(simulator.state.t), callback)
                                   for callback in active_callbacks)
    else:
        simulator.state.METHOD_NAME(time_point)
    return simulator.state.t