class_docstr: Env presenting ConvertedEnvironment as multiple single player streams.
class_docstr_tok: ["Env","presenting","ConvertedEnvironment","as","multiple","single","player","streams","."]
code: def _player_timestep(self, player: int):
      first_step = self._timestep.step_type is dm_env.StepType.FIRST
      return dm_env.TimeStep(
          step_type=self._timestep.step_type,
          reward=float(self._timestep.reward[player])
          if not first_step
          else None,
          discount=self._timestep.discount if not first_step else None,
          observation=self._timestep.observation[player],
      )
  
imports: import functools
  import threading
  from typing import Any, Mapping, NamedTuple, Sequence
  import dm_env
  import numpy
  from pysc2.env.converter import converter
  from pysc2.env.converter.proto import converter_pb2
  from pysc2.lib import actions
  import tree
  import typing_extensions
  from s2clientprotocol import common_pb2
  from s2clientprotocol import raw_pb2
  from s2clientprotocol import sc2api_pb2
label_desc: Use image node_id 9 for calling the _StreamedEnvironment obj's underlying member method code with example usage: obj._player_timestep(player) and returns: dm_env