<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def run_for(self, duration: Timedelta, with_logging: bool=True) -> int: """Run the simulation for the given time duration. Parameters duration The length of time to run the simulation for. Should be the same type as the simulation clock's step size (usually a pandas Timedelta). with_logging Whether or not to log the simulation steps. Only works in an ipython environment. Returns ------- The number of steps the simulation took. """

        return self.run_until(self.clock.time + duration, with_logging=with_logging)