code: def _get_save_spec(model):
      shapes_dict = getattr(model, "_build_shapes_dict", None)
      if not shapes_dict:
          return None
  
      if len(shapes_dict) == 1:
          return tf.TensorSpec(
              shape=list(shapes_dict.values())[0],
              dtype=model.input_dtype,
          )
  
      specs = {}
      for key, value in shapes_dict.items():
          key = key.rstrip("_shape")
          specs[key] = tf.TensorSpec(
              shape=value, dtype=model.input_dtype
          )
      return specs
  
imports: from absl import logging
  from keras import backend
  from keras.api_export import keras_export
  from keras.layers import Layer
  from keras.models import Functional
  from keras.models import Sequential
  from keras.utils import io_utils
  from keras.utils.module_utils import tensorflow
label_desc: Use image node_id 2 for calling a global function with example usage: _get_save_spec(model) and returns: specs, None, tf