code: def run(self, include_reset=True, accelerated=True):
          self._start_tick = self.tick_count
          if self._check_stop_conditions(self.sensor_graph):
              return
          if include_reset:
              pass
          i = None
          for i, stim in enumerate(self.stimuli):
              if stim.time != 0:
                  break
              reading = IOTileReading(self.tick_count, stim.stream.encode(), stim.value)
              self.sensor_graph.process_input(stim.stream, reading, self.rpc_executor)
          if i is not None and i > 0:
              self.stimuli = self.stimuli[i:]
          while not self._check_stop_conditions(self.sensor_graph):
              now = monotonic()
              next_tick = now + 1.0
              self.tick_count += 1
              i = None
              for i, stim in enumerate(self.stimuli):
                  if stim.time != self.tick_count:
                      break
                  reading = IOTileReading(self.tick_count, stim.stream.encode(), stim.value)
                  self.sensor_graph.process_input(stim.stream, reading, self.rpc_executor)
              if i is not None and i > 0:
                  self.stimuli = self.stimuli[i:]
              self._check_additional_ticks(self.tick_count)
              if (self.tick_count % 10) == 0:
                  reading = IOTileReading(self.tick_count, system_tick.encode(), self.tick_count)
                  self.sensor_graph.process_input(system_tick, reading, self.rpc_executor)
                  reading = IOTileReading(self.tick_count, battery_voltage.encode(), int(self.voltage * 65536))
                  self.sensor_graph.process_input(battery_voltage, reading, self.rpc_executor)
              now = monotonic()
              if (not accelerated) and (now < next_tick):
                  time.sleep(next_tick - now)