class_docstr: An OpenSpiel RL environment loop.
  
  This takes `Environment` and list of `Actor` instances and coordinates their
  interaction. Agents are updated if `should_update=True`. This can be used as:
  
    loop = EnvironmentLoop(environment, actors)
    loop.run(num_episodes)
  
  A `Counter` instance can optionally be given in order to maintain counts
  between different Acme components. If not given a local Counter will be
  created to maintain counts between calls to the `run` method.
  
  A `Logger` instance can also be passed in order to control the output of the
  loop. If not given a platform-specific default logger will be used as defined
  by utils.loggers.make_default_logger. A string `label` can be passed to easily
  change the label associated with the default logger; this is ignored if a
  `Logger` instance is given.
class_docstr_tok: ["An","OpenSpiel","RL","environment","loop",".","This","takes","`","Environment","`","and","list","of","`","Actor","`","instances","and","coordinates","their","interaction",".","Agents","are","updated","if","`","should_update=True","`",".","This","can","be","used","as",":","loop","=","EnvironmentLoop","(","environment",",","actors",")","loop.run","(","num_episodes",")","A","`","Counter","`","instance","can","optionally","be","given","in","order","to","maintain","counts","between","different","Acme","components",".","If","not","given","a","local","Counter","will","be","created","to","maintain","counts","between","calls","to","the","`","run","`","method",".","A","`","Logger","`","instance","can","also","be","passed","in","order","to","control","the","output","of","the","loop",".","If","not","given","a","platform-specific","default","logger","will","be","used","as","defined","by","utils.loggers.make_default_logger",".","A","string","`","label","`","can","be","passed","to","easily","change","the","label","associated","with","the","default","logger",";","this","is","ignored","if","a","`","Logger","`","instance","is","given","."]
code: def _get_player_timestep(
      self, timestep: dm_env.TimeStep, player: int
  ) -> dm_env.TimeStep:
      return dm_env.TimeStep(
          observation=timestep.observation[player],
          reward=timestep.reward[player],
          discount=timestep.discount[player],
          step_type=timestep.step_type,
      )
  
imports: import operator
  import time
  from typing import Optional, Sequence
  from acme import core
  from acme.utils import counting
  from acme.utils import loggers
  from acme.wrappers import open_spiel_wrapper
  import dm_env
  from dm_env import specs
  import numpy
  import tree
  import pyspiel
label_desc: Use image node_id 4 for calling the OpenSpielEnvironmentLoop obj's underlying member method code with example usage: obj._get_player_timestep(timestep, player) and returns: dm_env