class_docstr: Environment wrapper for OpenSpiel RL environments.
class_docstr_tok: ["Environment","wrapper","for","OpenSpiel","RL","environments","."]
code: def _convert_observation(
      self, open_spiel_timestep: rl_environment.TimeStep
  ) -> List[OLT]:
      observations = []
      for pid in range(self._environment.num_players):
          legals = np.zeros(
              self._environment.game.num_distinct_actions(),
              dtype=np.float32,
          )
          legals[
              open_spiel_timestep.observations["legal_actions"][pid]
          ] = 1.0
          player_observation = OLT(
              observation=np.asarray(
                  open_spiel_timestep.observations["info_state"][pid],
                  dtype=np.float32,
              ),
              legal_actions=legals,
              terminal=np.asarray(
                  [open_spiel_timestep.last()], dtype=np.float32
              ),
          )
          observations.append(player_observation)
      return observations
  
imports: from typing import List, NamedTuple
  from acme import specs
  from acme import types
  import dm_env
  import numpy
  from open_spiel.python import rl_environment
label_desc: Use image node_id 4 for calling the OpenSpielWrapper obj's underlying member method code with example usage: obj._convert_observation(open_spiel_timestep) and returns: observations