code: def serialize_keras_object(obj):
      if hasattr(tf.keras.utils, "legacy"):
          return tf.keras.utils.legacy.serialize_keras_object(obj)
      else:
          return tf.keras.utils.serialize_keras_object(obj)
  
file_path: ranking/tensorflow_ranking/python/keras/utils.py
imports: from typing import Callable
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: serialize_keras_object(obj) and returns: tf, tf