code: def assert_training_model(model):
      """Assert that the model is a training model."""
      assert all(
          output in model.output_names
          for output in ["regression", "classification"]
      ), "Input is not a training model (no 'regression' and 'classification' outputs were found, outputs are: {}).".format(
          model.output_names
      )
  
file_path: ImageAI/imageai_tf_deprecated/Detection/keras_retinanet/models/__init__.py
imports: from __future__ import print_function
  import sys
label_desc: Use image node_id 4 for calling a global function with example usage: assert_training_model(model) without return types