code: def build_experiment_config() -> (
      experiments.ExperimentConfig[
          iq_learn.IQLearnNetworks,
          actor_core_lib.ActorCore,
          iq_learn.IQLearnSample,
      ]
  ):
      """Returns a configuration for IQLearn experiments."""
  
      # Create an environment, grab the spec, and use it to create networks.
      env_name = FLAGS.env_name
      environment_factory = _make_environment_factory(env_name)
  
      dummy_seed = 1
      environment = environment_factory(dummy_seed)
      environment_spec = specs.make_environment_spec(environment)
  
      # Create demonstrations function.
      dataset_name = helpers.get_dataset_name(env_name)
      make_demonstrations = _make_demonstration_dataset_factory(
          dataset_name,
          environment_spec,
          FLAGS.num_demonstrations,
          jax.random.PRNGKey(FLAGS.seed),
      )
  
      # Construct the agent
      iq_learn_config = iq_learn.IQLearnConfig(alpha=1.0)
      iq_learn_builder = (
          iq_learn.IQLearnBuilder(  # pytype: disable=wrong-arg-types
              config=iq_learn_config,
              make_demonstrations=make_demonstrations,
          )
      )
  
      return experiments.ExperimentConfig(
          builder=iq_learn_builder,
          environment_factory=environment_factory,
          network_factory=iq_learn.make_networks,
          seed=FLAGS.seed,
          max_num_actor_steps=FLAGS.num_steps,
      )
  
file_path: acme/examples/baselines/imitation/run_iqlearn.py
imports: from typing import Callable, Iterator
  from absl import flags
  from acme import specs
  from acme import types
  from acme.agents.jax import actor_core
  from acme.agents.jax import iq_learn
  from acme.datasets import tfds
  import helpers
  from absl import app
  from acme.jax import experiments
  from acme.jax import types
  from acme.utils import lp_utils
  import dm_env
  import jax
  import launchpad
label_desc: Use image node_id 3 for calling a global function with example usage: build_experiment_config() and returns: experiments