code: def test_player() -> None:
      player = envs.JamesBond()
      assert player.get_state() == (0, 0)
      action_states = [
          ("protect", (0, 1)),
          ("protect", (0, 2)),
          ("reload", (1, 0)),
          ("fire", (0, 0)),
      ]
      for k, (action, state) in enumerate(action_states):
          player.update_with_action(action)
          assert (
              player.get_state() == state
          ), f"Unexpected state at action #{k}"
      with pytest.raises(ValueError):
          player.update_with_action("fire")
      with pytest.raises(ValueError):
          player.update_with_action("blublu")
  
file_path: nevergrad/nevergrad/functions/rl/test_envs.py
imports: import typing
  import pytest
  import numpy
  from nevergrad.common import testing
  from .None import envs
label_desc: Use image node_id 1 for calling a global function with example usage: test_player() without return types