code: def test_full_learner(self):
      # Create dataset.
      environment = fakes.DiscreteEnvironment(
          num_actions=5,
          num_observations=10,
          obs_dtype=np.float32,
          episode_length=10,
      )
      spec = specs.make_environment_spec(environment)
      dataset = fakes.transition_dataset(environment).batch(2)
  
      # Build network.
      g_network = _make_network(spec.actions)
      q_network = _make_network(spec.actions)
      network = discrete_networks.DiscreteFilteredQNetwork(
          g_network=g_network, q_network=q_network, threshold=0.5
      )
      tf2_utils.create_variables(network, [spec.observations])
  
      # Build learner.
      counter = counting.Counter()
      learner = bcq.DiscreteBCQLearner(
          network=network,
          dataset=dataset,
          learning_rate=1e-4,
          discount=0.99,
          importance_sampling_exponent=0.2,
          target_update_period=100,
          counter=counter,
      )
  
      # Run a learner step.
      learner.step()
  
      # Check counts from BC and BCQ learners.
      counts = counter.get_counts()
      self.assertEqual(1, counts["bc_steps"])
      self.assertEqual(1, counts["bcq_steps"])
  
      # Check learner state.
      self.assertEqual(1, learner.state["bc_num_steps"].numpy())
      self.assertEqual(1, learner.state["bcq_num_steps"].numpy())
  
file_path: acme/acme/agents/tf/bcq/discrete_learning_test.py
imports: from acme import specs
  from acme.agents.tf import bcq
  from acme.testing import fakes
  from acme.tf import utils
  from acme.tf.networks import discrete
  from acme.utils import counting
  import numpy
  import sonnet
  from absl.testing import absltest
label_desc: Use image node_id 1 for calling the DiscreteBCQLearnerTest obj's underlying member method code with example usage: obj.test_full_learner() without return types