code: def _build_module(self, input_layer):
      if (
          hasattr(self.ap.task_parameters, "checkpoint_restore_path")
          and self.ap.task_parameters.checkpoint_restore_path
      ):
          self.DND = differentiable_neural_dictionary.load_dnd(
              self.ap.task_parameters.checkpoint_restore_path
          )
      else:
          self.DND = differentiable_neural_dictionary.QDND(
              self.DND_size,
              input_layer.get_shape()[-1],
              self.num_actions,
              self.new_value_shift_coefficient,
              key_error_threshold=self.DND_key_error_threshold,
              learning_rate=self.network_parameters.learning_rate,
              num_neighbors=self.number_of_nn,
              override_existing_keys=True,
          )
  
      # Retrieve info from DND dictionary
      # We assume that all actions have enough entries in the DND
      self.q_values = self.output = tf.transpose(
          [
              self._q_value(input_layer, action)
              for action in range(self.num_actions)
          ]
      )
  
      # used in batch-rl to estimate a probablity distribution over actions
      self.softmax = self.add_softmax_with_temperature()
  
file_path: coach/rl_coach/architectures/tensorflow_components/heads/dnd_q_head.py
imports: import tensorflow
  from rl_coach.architectures.tensorflow_components.layers import Dense
  from rl_coach.architectures.tensorflow_components.heads.q_head import QHead
  from rl_coach.base_parameters import AgentParameters
  from rl_coach.memories.non_episodic import differentiable_neural_dictionary
  from rl_coach.spaces import SpacesDefinition
label_desc: Use image node_id 2 for calling the DNDQHead obj's underlying member method code with example usage: obj._build_module(input_layer) without return types