class_docstr: Internal adapter of ExternalEnv to BaseEnv.
class_docstr_tok: ["Internal","adapter","of","ExternalEnv","to","BaseEnv","."]
code: def poll(
      self,
  ) -> Tuple[
      MultiEnvDict,
      MultiEnvDict,
      MultiEnvDict,
      MultiEnvDict,
      MultiEnvDict,
  ]:
      with self.external_env._results_avail_condition:
          results = self._poll()
          while len(results[0]) == 0:
              self.external_env._results_avail_condition.wait()
              results = self._poll()
              if not self.external_env.is_alive():
                  raise Exception("Serving thread has stopped.")
      return results
  
imports: import gymnasium
  import queue
  import threading
  import uuid
  from typing import Callable, Tuple, Optional, TYPE_CHECKING
  from ray.rllib.env.base_env import BaseEnv
  from ray.rllib.utils.annotations import override, PublicAPI
  from ray.rllib.utils.typing import EnvActionType, EnvInfoDict, EnvObsType, EnvType, MultiEnvDict
  from ray.rllib.utils.deprecation import deprecation_warning
label_desc: Use image node_id 2 for calling the ExternalEnvWrapper obj's underlying member method code with example usage: obj.poll() and returns: results