code: def serialize_keras_object(obj):
      if hasattr(tf.keras.utils, "legacy"):
          return tf.keras.utils.legacy.serialize_keras_object(
              obj
          )  # pragma: no cover
      else:
          return tf.keras.utils.serialize_keras_object(obj)
  
file_path: autokeras/autokeras/utils/utils.py
imports: import re
  import warnings
  import keras_tuner
  import tensorflow
  from packaging.version import parse
  from tensorflow import nest
label_desc: Use image node_id 12 for calling a global function with example usage: serialize_keras_object(obj) and returns: tf, tf