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: model-optimization/tensorflow_model_optimization/python/core/quantization/keras/utils.py
imports: import inspect
  import tempfile
  import tensorflow
  from tensorflow_model_optimization.python.core.keras import compat
label_desc: Use image node_id 1 for calling a global function with example usage: serialize_keras_object(obj) and returns: tf, tf