code: def stop(self, **kwargs):
          
          for key in kwargs:
              setattr(self, key, kwargs[key])
          self.command = self.COMMAND_STOP
docs: Stop any of the run commands before they are complete using the
          action specified by `stop_action`.