code: def _raise_loading_failure(error_msgs, warn_only=False):
      first_key = list(error_msgs.keys())[0]
      ex_trackable, ex_error = error_msgs[first_key]
      msg = (
          f"A total of {len(error_msgs)} objects could not "
          "be loaded. Example error message for "
          f"object {ex_trackable}:\n\n"
          f"{ex_error}\n\n"
          "List of objects that could not be loaded:\n"
          f"{[x[0] for x in error_msgs.values()]}"
      )
      if warn_only:
          warnings.warn(msg)
      else:
          raise ValueError(msg)
  
imports: import datetime
  import io
  import json
  import tempfile
  import warnings
  import zipfile
  import numpy
  from keras.backend.common import global_state
  from keras.layers.layer import Layer
  from keras.losses.loss import Loss
  from keras.metrics.metric import Metric
  from keras.optimizers.optimizer import Optimizer
  from keras.saving.serialization_lib import ObjectSharingScope
  from keras.saving.serialization_lib import deserialize_keras_object
  from keras.saving.serialization_lib import serialize_keras_object
  from keras.trainers.compile_utils import CompileMetrics
  from keras.utils import file_utils
  from keras.utils import naming
  from keras.version import __version__
label_desc: Use image node_id 5 for calling a global function with example usage: _raise_loading_failure(error_msgs, warn_only) without return types