code: def test_torch_agent() -> None:
      mgame = envs.DoubleOSeven()
      game = mgame.with_agent(
          player_1=agents.RandomAgent(mgame)
      ).as_single_agent()
      obs = game.reset()
      agent = agents.TorchAgent.from_module_maker(game, agents.DenseNet)
      output = agent.act(obs, 0.0, False, None)
      assert output in game.action_space
  
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 3 for calling a global function with example usage: test_torch_agent() without return types