code: def _type_model(model):
      """Check type of the model: Sequential/Functional, Layer or Subclassed.
  
      Args:
        model : provided model to check
      Returns:
        [tuple]: (is_sequential_or_functional,
          is_keras_layer, is_subclassed_model)
      """
      # pylint:disable=protected-access
      is_sequential_or_functional = isinstance(
          model, tf.keras.Model
      ) and (
          isinstance(model, tf.keras.Sequential)
          or model._is_graph_network
      )
  
      is_keras_layer = isinstance(
          model, tf.keras.layers.Layer
      ) and not isinstance(model, tf.keras.Model)
  
      is_subclassed_model = isinstance(model, tf.keras.Model) and (
          not model._is_graph_network
      )
  
      return (
          is_sequential_or_functional,
          is_keras_layer,
          is_subclassed_model,
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: _type_model(model) and returns: is_sequential_or_functional,  is_keras_layer,  is_subclassed_model