code: def test_doubleoseven(
      base_sequence: tp.List[tp.Tuple[str, str]],
      base_expected: tp.Dict[str, int],
  ) -> None:
      game = envs.DoubleOSeven()
      for case in ["standard", "symmetric"]:
          # prepare sequence for either standard case or symmetric case (player1 and player2 actions are inverted)
          # this makes sure everything is symmetrical
          if case == "standard":
              sequence = base_sequence
              expected = base_expected
          else:
              sequence = [(a[1], a[0]) for a in base_sequence]
              expected = {
                  "player_0": base_expected["player_1"],
                  "player_1": base_expected["player_0"],
              }
          # play
          game.reset()
          for k, actions in enumerate(sequence):
              actions_dict = {
                  f"player_{k}": envs.JamesBond.actions.index(a)
                  for k, a in enumerate(actions)
              }
              _, rew, done, _ = game.step(actions_dict)
              if k != len(sequence) - 1 and done["__all__"]:
                  raise AssertionError(
                      f"The game should not have finished at step {k} with actions {actions} ({case})"
                  )
          if not done["__all__"]:
              # pylint: disable=undefined-loop-variable
              raise AssertionError(
                  f"The game should have finished at last step with actions {actions} ({case})"
              )
          assert rew == expected, f"Wrong output for case: {case}"
  
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 3 for calling a global function with example usage: test_doubleoseven(base_sequence, base_expected) without return types