code: def testScalarizeObjectivesWrongInputRankRaisesError(self):
      objectives_tensor = tf.constant([1], dtype=tf.float32)
      with self.assertRaisesRegexp(
          ValueError,
          "The objectives_tensor should be rank-3, but is rank-1",
      ):
          greedy_multi_objective_policy.scalarize_objectives(
              objectives_tensor, self._scalarizer
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from typing import Dict, List, Text, Tuple
  import numpy
  import tensorflow
  from tf_agents.bandits.multi_objective import multi_objective_scalarizer
  from tf_agents.bandits.networks import global_and_arm_feature_network
  from tf_agents.bandits.networks import heteroscedastic_q_network
  from tf_agents.bandits.policies import greedy_multi_objective_neural_policy
  from tf_agents.bandits.specs import utils
  from tf_agents.networks import network
  from tf_agents.policies import utils
  from tf_agents.specs import array_spec
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.typing import types
  from tf_agents.utils import test_utils
label_desc: Use image node_id 2 for calling the ScalarizeObjectivesTest obj's underlying member method code with example usage: obj.testScalarizeObjectivesWrongInputRankRaisesError() without return types