code: def _q_value(self, input_layer, action):
      result = tf.py_func(
          self.DND.query,
          [input_layer, action, self.number_of_nn],
          [tf.float64, tf.float64, tf.int64],
      )
      self.dnd_embeddings[action] = tf.to_float(result[0])
      self.dnd_values[action] = tf.to_float(result[1])
      self.dnd_indices[action] = result[2]
  
      # DND calculation
      square_diff = tf.square(
          self.dnd_embeddings[action] - tf.expand_dims(input_layer, 1)
      )
      distances = tf.reduce_sum(square_diff, axis=2) + [
          self.l2_norm_added_delta
      ]
      self.dnd_distances[action] = distances
      weights = 1.0 / distances
      normalised_weights = weights / tf.reduce_sum(
          weights, axis=1, keep_dims=True
      )
      q_value = tf.reduce_sum(
          self.dnd_values[action] * normalised_weights, axis=1
      )
      q_value.set_shape((None,))
      return q_value
  
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 3 for calling the DNDQHead obj's underlying member method code with example usage: obj._q_value(input_layer, action) and returns: q_value