code: def test_annotate_asset(self, use_tf_compat_v1):
      if not use_tf_compat_v1:
          test_case.skip_if_not_tf2("Tensorflow 2.x required")
  
      def foo():
          annotators.annotate_asset("scope/my_key", "scope/my_value")
          annotators.annotate_asset("my_key2", "should_be_replaced")
          annotators.annotate_asset("my_key2", "my_value2")
  
      if use_tf_compat_v1:
          with tf.Graph().as_default() as graph:
              foo()
      else:
          graph = tf.function(foo).get_concrete_function().graph
  
      self.assertDictEqual(
          annotators.get_asset_annotations(graph),
          {"my_key": "my_value", "my_key2": "my_value2"},
      )
  
      annotators.clear_asset_annotations(graph)
      self.assertDictEqual(annotators.get_asset_annotations(graph), {})
  
imports: import tensorflow
  from tensorflow_transform import annotators
  from tensorflow_transform import test_case
label_desc: Use image node_id 1 for calling the AnnotatorsTest obj's underlying member method code with example usage: obj.test_annotate_asset(use_tf_compat_v1) without return types