code: def test_play_environment() -> None:
      mgame = envs.DoubleOSeven(verbose=True)
      player_0 = agents.RandomAgent(mgame)
      player_1 = agents.RandomAgent(mgame)
      runner = base.EnvironmentRunner(mgame)
      rewards = runner.run(player_1=player_1, player_0=player_0)
      assert isinstance(rewards, dict)
      assert sum(rewards.values()) in [0, 1]
  
file_path: nevergrad/nevergrad/functions/rl/test_agents.py
imports: import numpy
  import pytest
  from nevergrad.optimization import optimizerlib
  from nevergrad.optimization import helpers
  from .None import agents
  from .None import envs
  from .None import base
label_desc: Use image node_id 1 for calling a global function with example usage: test_play_environment() without return types