code: def testBUpdateEmptyObservations(self, batch_size, context_dim):
      r = tf.constant([], dtype=tf.float32, shape=[0, 1])
      x = tf.constant([], dtype=tf.float32, shape=[0, context_dim])
      b_update = utils.sum_reward_weighted_observations(r, x)
      expected_b_update_array = np.zeros(
          [context_dim], dtype=np.float32
      )
      self.assertAllClose(
          expected_b_update_array, self.evaluate(b_update)
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import numpy
  import tensorflow
  import tensorflow_probability
  from tf_agents.bandits.agents import utils
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
label_desc: Use image node_id 2 for calling the UtilsTest obj's underlying member method code with example usage: obj.testBUpdateEmptyObservations(batch_size, context_dim) without return types