code: def testWeakStructCopiesContainers(self):
      a = tf.constant(1.0, name="alice")
      b = tf.constant(2.0, name="bob")
      c = tf.constant(3.0, name="carol")
      tensor_struct = [a, {"x": b, "y": c}]
  
      # Reference the original struct.
      weak_ref = cache_util.WeakStructRef(tensor_struct)
  
      # Copy the structure, then mutate the original inplace.
      struct_copy = tf.nest.map_structure(lambda x: x, tensor_struct)
      tensor_struct[:] = tensor_struct[::-1]
  
      self.assertEqual(weak_ref(), struct_copy)
      with self.assertRaises(
          ValueError
      ):  # pylint: disable=g-error-prone-assert-raises
          tf.nest.assert_same_structure(weak_ref(), tensor_struct)
  
imports: from absl.testing import parameterized
  import tensorflow.compat.v2
  from tensorflow_probability.python.internal import cache_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 6 for calling the HashableRefTest obj's underlying member method code with example usage: obj.testWeakStructCopiesContainers() without return types