code: def test_benchmark_deserialization_speed():
      features = features_lib.FeaturesDict(
          {
              "a": np.int32,
              "b": {
                  "c": np.int32,
              },
          }
      )
      example = {"a": 1, "b": {"c": 2}}
      serialized_example = features.serialize_example(example)
      number_of_examples = 100
      assert features.deserialize_example(serialized_example) == example
      assert (
          features.deserialize_example_np(serialized_example) == example
      )
  
      start_time = time.time()
      for _ in range(number_of_examples):
          features.deserialize_example(serialized_example)
      tf_time = time.time() - start_time
  
      start_time = time.time()
      for _ in range(number_of_examples):
          features.deserialize_example_np(serialized_example)
      np_time = time.time() - start_time
  
      # NumPy deserialization should be faster than TensorFlow deserialization.
      # If you improved TensorFlow deserialization, please delete this test.
      assert np_time < tf_time
  
file_path: datasets/tensorflow_datasets/core/features/top_level_feature_test.py
imports: import time
  import numpy
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core.features import top_level_feature
label_desc: Use image node_id 1 for calling a global function with example usage: test_benchmark_deserialization_speed() without return types