code: def set_secondary_state(self, value):
          
          if value not in (_STATE_RUNNING, _STATE_SHUTDOWN, _STATE_FORCED_SHUTDOWN):
              raise ValueError(
                  "State {!r} is invalid - needs to be one of _STATE_RUNNING, _STATE_SHUTDOWN, or _STATE_FORCED_SHUTDOWN".format(
                      value)
                  )
          if self.manager is None:
              raise RuntimeError("Manager not started")
          self.manager.set_state(value)
docs: Sets the value for 'secondary_state'.