code: def run_until(self, end_time: Time, with_logging=True) -> int:
          
          if not isinstance(end_time, type(self.clock.time)):
              raise ValueError(f"Provided time must be an instance of {type(self.clock.time)}")
  
          iterations = int(ceil((end_time - self.clock.time)/self.clock.step_size))
          self.take_steps(number_of_steps=iterations, with_logging=with_logging)
          assert self.clock.time - self.clock.step_size < end_time <= self.clock.time
          return iterations
docs: Run the simulation until the provided end time.
  
          Parameters
          ----------
          end_time
              The time to run the simulation until. The simulation will run until
              its clock is greater than or equal to the provided end time.
          with_logging
              Whether or not to log the simulation steps. Only works in an ipython
              environment.
  
          Returns
          -------
              The number of steps the simulation took.