code: def setUp(self):
      # preparing various components for qr-dqn trainer initialization
      self.batch_size = 3
      self.state_dim = 10
      self.action_dim = 2
      self.num_layers = 2
      self.sizes = [20 for _ in range(self.num_layers)]
      self.num_atoms = 11
      self.activations = ["relu" for _ in range(self.num_layers)]
      self.dropout_ratio = 0
      self.exploration_variance = 1e-10
  
      self.actions = [str(i) for i in range(self.action_dim)]
      self.params = CRRTrainerParameters(actions=self.actions)
      self.reward_options = RewardOptions()
      self.metrics_to_score = get_metrics_to_score(
          self.reward_options.metric_reward_values
      )
  
      self.actor_network = FullyConnectedActor(
          state_dim=self.state_dim,
          action_dim=self.action_dim,
          sizes=self.sizes,
          activations=self.activations,
          exploration_variance=self.exploration_variance,
      )
      self.actor_network_target = (
          self.actor_network.get_target_network()
      )
  
      self.q1_network = FullyConnectedDQN(
          state_dim=self.state_dim,
          action_dim=self.action_dim,
          sizes=self.sizes,
          activations=self.activations,
          dropout_ratio=self.dropout_ratio,
      )
      self.q1_network_target = self.q1_network.get_target_network()
  
      self.q2_network = FullyConnectedDQN(
          state_dim=self.state_dim,
          action_dim=self.action_dim,
          sizes=self.sizes,
          activations=self.activations,
          dropout_ratio=self.dropout_ratio,
      )
      self.q2_network_target = self.q2_network.get_target_network()
  
      self.num_output_nodes = (len(self.metrics_to_score) + 1) * len(
          self.params.actions
      )
      self.eval_parameters = EvaluationParameters(
          calc_cpe_in_training=True
      )
      self.reward_network = FullyConnectedDQN(
          state_dim=self.state_dim,
          action_dim=self.num_output_nodes,
          sizes=self.sizes,
          activations=self.activations,
      )
      self.q_network_cpe = FullyConnectedDQN(
          state_dim=self.state_dim,
          action_dim=self.num_output_nodes,
          sizes=self.sizes,
          activations=self.activations,
      )
      self.q_network_cpe_target = (
          self.q_network_cpe.get_target_network()
      )
      self.inp = DiscreteDqnInput(
          state=FeatureData(
              float_features=torch.rand(self.batch_size, self.state_dim)
          ),
          next_state=FeatureData(
              float_features=torch.rand(self.batch_size, self.state_dim)
          ),
          reward=torch.ones(self.batch_size, 1),
          time_diff=torch.ones(self.batch_size, 1) * 2,
          step=torch.ones(self.batch_size, 1) * 2,
          not_terminal=torch.ones(
              self.batch_size, 1
          ),  # todo: check terminal behavior
          action=torch.tensor([[0, 1], [1, 0], [0, 1]]),
          next_action=torch.tensor([[1, 0], [0, 1], [1, 0]]),
          possible_actions_mask=torch.ones(
              self.batch_size, self.action_dim
          ),
          possible_next_actions_mask=torch.ones(
              self.batch_size, self.action_dim
          ),
          extras=ExtraData(
              action_probability=torch.ones(self.batch_size, 1)
          ),
      )
  
imports: import unittest
  import torch
  from reagent.core.parameters import EvaluationParameters, RLParameters
  from reagent.core.types import DiscreteDqnInput, ExtraData, FeatureData
  from reagent.evaluation.evaluator import get_metrics_to_score
  from reagent.models.actor import FullyConnectedActor
  from reagent.models.dqn import FullyConnectedDQN
  from reagent.training.discrete_crr_trainer import DiscreteCRRTrainer
  from reagent.training.parameters import CRRTrainerParameters
  from reagent.workflow.types import RewardOptions
label_desc: Use image node_id 1 for calling the TestCRR obj's underlying member method code with example usage: obj.setUp() without return types