code: def test_play_single_agent_environment() -> None:
      mgame = envs.DoubleOSeven()
      game = mgame.with_agent(
          player_1=agents.RandomAgent(mgame)
      ).as_single_agent()
      rand = agents.RandomAgent(game)
      runner = base.EnvironmentRunner(game)
      reward = runner.run(rand)
      assert isinstance(reward, float)
      assert reward 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 2 for calling a global function with example usage: test_play_single_agent_environment() without return types