code: def _load_state(
      trackable,
      weights_store,
      assets_store,
      inner_path,
      skip_mismatch=False,
      visited_trackables=None,
      failed_trackables=None,
      error_msgs=None,
  ):
      if visited_trackables and id(trackable) in visited_trackables:
          return
  
      failure = False
  
      if hasattr(trackable, "load_own_variables") and weights_store:
          if skip_mismatch or failed_trackables is not None:
              try:
                  trackable.load_own_variables(
                      weights_store.get(inner_path)
                  )
              except Exception as e:
                  failed_trackables.add(id(trackable))
                  error_msgs[id(trackable)] = trackable, e
                  failure = True
          else:
              trackable.load_own_variables(
                  weights_store.get(inner_path)
              )
  
      if hasattr(trackable, "load_assets") and assets_store:
          if skip_mismatch or failed_trackables is not None:
              try:
                  trackable.load_assets(assets_store.get(inner_path))
              except Exception as e:
                  failed_trackables.add(id(trackable))
                  error_msgs[id(trackable)] = trackable, e
                  failure = True
          else:
              trackable.load_assets(assets_store.get(inner_path))
  
      if failed_trackables is not None:
          currently_failed = len(failed_trackables)
      else:
          currently_failed = 0
  
      # Recursively load states for Keras trackables such as layers/optimizers.
      for child_attr, child_obj in _walk_trackable(trackable):
          if _is_keras_trackable(child_obj):
              _load_state(
                  child_obj,
                  weights_store,
                  assets_store,
                  inner_path=file_utils.join(
                      inner_path, child_attr
                  ).replace("\\", "/"),
                  skip_mismatch=skip_mismatch,
                  visited_trackables=visited_trackables,
                  failed_trackables=failed_trackables,
                  error_msgs=error_msgs,
              )
          elif isinstance(child_obj, (list, dict, tuple, set)):
              _load_container_state(
                  child_obj,
                  weights_store,
                  assets_store,
                  inner_path=file_utils.join(
                      inner_path, child_attr
                  ).replace("\\", "/"),
                  skip_mismatch=skip_mismatch,
                  visited_trackables=visited_trackables,
                  failed_trackables=failed_trackables,
                  error_msgs=error_msgs,
              )
  
      if failed_trackables is not None:
          newly_failed = len(failed_trackables) - currently_failed
      else:
          newly_failed = 0
  
      if not failure:
          if visited_trackables is not None and newly_failed <= 0:
              visited_trackables.add(id(trackable))
          if id(trackable) in failed_trackables:
              failed_trackables.remove(id(trackable))
              error_msgs.pop(id(trackable))
  
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 10 for calling a global function with example usage: _load_state(trackable, weights_store, assets_store, inner_path, skip_mismatch, visited_trackables, failed_trackables, error_msgs) without return types