code: def main(_):
      # Create an environment and grab the spec.
      raw_environment = bsuite.load_and_record_to_csv(
          bsuite_id=FLAGS.bsuite_id,
          results_dir=FLAGS.results_dir,
          overwrite=FLAGS.overwrite,
      )
      environment = wrappers.SinglePrecisionWrapper(raw_environment)
      environment_spec = specs.make_environment_spec(environment)
  
      network = snt.Sequential(
          [
              snt.Flatten(),
              snt.nets.MLP(
                  [50, 50, environment_spec.actions.num_values]
              ),
          ]
      )
  
      # Construct the agent.
      agent = dqn.DQN(
          environment_spec=environment_spec, network=network
      )
  
      # Run the environment loop.
      loop = acme.EnvironmentLoop(environment, agent)
      loop.run(num_episodes=environment.bsuite_num_episodes)
  
file_path: acme/examples/bsuite/run_dqn.py
imports: from absl import app
  from absl import flags
  import acme
  from acme import specs
  from acme import wrappers
  from acme.agents.tf import dqn
  import bsuite
  import sonnet
label_desc: Use image node_id 1 for calling a global function with example usage: main(_) without return types