code: def testNearZeroObjectivesAndDirectionCoordinates(self):
      multi_objectives = tf.constant([[3, 0, 0]], dtype=tf.float32)
  
      # direction with small non-zero coordinates.
      nonzero = (
          2
          * multi_objective_scalarizer.HyperVolumeScalarizer.ALMOST_ZERO
      )
      direction = [1, nonzero, nonzero]
      scalarizer = multi_objective_scalarizer.HyperVolumeScalarizer(
          direction, self._hv_params
      )
      self.assertAllClose(
          self.evaluate(scalarizer(multi_objectives)),
          self.evaluate(tf.constant([0], dtype=tf.float32)),
      )
  
      # direction with coordinates that are so small in magnitude that would be
      # considered zeros.
      direction = [1, 1e-30, 1e-30]
      scalarizer = multi_objective_scalarizer.HyperVolumeScalarizer(
          direction, self._hv_params
      )
      self.assertAllClose(
          self.evaluate(scalarizer(multi_objectives)),
          self.evaluate(tf.constant([3], dtype=tf.float32)),
      )
  
      # direction with absolute zero coordinates.
      direction = [1, 0, 0]
      scalarizer = multi_objective_scalarizer.HyperVolumeScalarizer(
          direction, self._hv_params
      )
      self.assertAllClose(
          self.evaluate(scalarizer(multi_objectives)),
          self.evaluate(tf.constant([3], dtype=tf.float32)),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import tensorflow.compat.v2
  from tf_agents.bandits.multi_objective import multi_objective_scalarizer
label_desc: Use image node_id 12 for calling the HyperVolumeScalarizerTest obj's underlying member method code with example usage: obj.testNearZeroObjectivesAndDirectionCoordinates() without return types