code: def _save_state(
      trackable,
      weights_store,
      assets_store,
      inner_path,
      visited_trackables,
  ):
      # If the trackable has already been saved, skip it.
      if id(trackable) in visited_trackables:
          return
  
      if hasattr(trackable, "save_own_variables") and weights_store:
          trackable.save_own_variables(weights_store.make(inner_path))
      if hasattr(trackable, "save_assets") and assets_store:
          trackable.save_assets(assets_store.make(inner_path))
  
      visited_trackables.add(id(trackable))
  
      # Recursively save state of children trackables (layers, optimizers, etc.)
      for child_attr, child_obj in _walk_trackable(trackable):
          if _is_keras_trackable(child_obj):
              _save_state(
                  child_obj,
                  weights_store,
                  assets_store,
                  inner_path=file_utils.join(
                      inner_path, child_attr
                  ).replace("\\", "/"),
                  visited_trackables=visited_trackables,
              )
          elif isinstance(child_obj, (list, dict, tuple, set)):
              _save_container_state(
                  child_obj,
                  weights_store,
                  assets_store,
                  inner_path=file_utils.join(
                      inner_path, child_attr
                  ).replace("\\", "/"),
                  visited_trackables=visited_trackables,
              )
  
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 9 for calling a global function with example usage: _save_state(trackable, weights_store, assets_store, inner_path, visited_trackables) without return types