code: def setUp(self):
      super(QtoptAgentTest, self).setUp()
      tf.compat.v1.enable_resource_variables()
      self._observation_spec = tensor_spec.TensorSpec([2], tf.float32)
      self._time_step_spec = ts.time_step_spec(self._observation_spec)
      self._action_spec = tensor_spec.BoundedTensorSpec(
          [1], tf.float32, 0.0, 1.0
      )
  
      # Initiate random mean and var.
      self._num_samples = 32
      action_size = 1
      np.random.seed(1999)
      samples = np.random.rand(self._num_samples, action_size).astype(
          np.float32
      )  # [N, a]
      self._mean = np.mean(samples, axis=0)
      self._var = np.var(samples, axis=0)
      self._sampler = (
          qtopt_cem_actions_sampler_continuous.GaussianActionsSampler(
              action_spec=self._action_spec
          )
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  from tf_agents.agents.ddpg import critic_network
  from tf_agents.agents.qtopt import qtopt_agent
  from tf_agents.networks import network
  from tf_agents.policies.samplers import qtopt_cem_actions_sampler_continuous
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import test_utils
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.utils import common
label_desc: Use image node_id 1 for calling the QtoptAgentTest obj's underlying member method code with example usage: obj.setUp() without return types