code: def set_env_info(self, env_state=None, env_id=None, episode_id=None, bump_past=None, fps=None):
          
          with self.cv:
              if env_id is None:
                  env_id = self._env_id
              if env_state is None:
                  env_state = self._env_state
              if fps is None:
                  fps = self._fps
              self.cv.notifyAll()
  
              old_episode_id = self._episode_id
              if self.primary:
                  current_id = parse_episode_id(self._episode_id)
                  # Bump when changing from resetting -> running
                  if bump_past is not None:
                      bump_past_id = parse_episode_id(bump_past)
                      current_id = max(bump_past_id+1, current_id+1)
                  elif env_state == 'resetting':
                      current_id += 1
                  self._episode_id = generate_episode_id(current_id)
                  assert self._fps or fps
              elif episode_id is False:
                  # keep the same episode_id: this is just us proactive
                  # setting the state to resetting after a done=True
                  pass
              else:
                  assert episode_id is not None, "No episode_id provided. This likely indicates a misbehaving server, which did not send an episode_id"
                  self._episode_id = episode_id
              self._fps = fps
              logger.info('[%s] Changing env_state: %s (env_id=%s) -> %s (env_id=%s) (episode_id: %s->%s, fps=%s)', self.label, self._env_state, self._env_id, env_state, env_id, old_episode_id, self._episode_id, self._fps)
              self._env_state = env_state
              if env_id is not None:
                  self._env_id = env_id
  
              return self.env_info()
docs: Atomically set the environment state tracking variables.