code: def _walk_trackable(trackable):
      from keras.models import Functional
      from keras.models import Sequential
  
      if isinstance(trackable, Sequential):
          obj_type = "Sequential"
      elif isinstance(trackable, Functional):
          obj_type = "Functional"
      elif isinstance(trackable, Layer):
          obj_type = "Layer"
      elif isinstance(trackable, Optimizer):
          obj_type = "Optimizer"
      elif isinstance(trackable, Metric):
          obj_type = "Metric"
      elif isinstance(trackable, Loss):
          obj_type = "Loss"
      else:
          raise ValueError(f"Invalid obj_type: {obj_type}")
      attr_skiplist = get_attr_skiplist(obj_type)
  
      # Save all layers directly tracked by Sequential and Functional first.
      # This helps avoid ordering concerns for subclassed Sequential or Functional
      # models with extra attributes--the internal Keras state take precedence.
      if obj_type in ("Sequential", "Functional"):
          yield "layers", trackable.layers
  
      for child_attr in sorted(
          dir(trackable), key=lambda x: _name_key(x)
      ):
          if child_attr.startswith("__") or child_attr in attr_skiplist:
              continue
          try:
              child_obj = getattr(trackable, child_attr)
          except Exception:
              # Avoid raising the exception when visiting the attributes.
              continue
          yield child_attr, child_obj
  
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 8 for calling a global function with example usage: _walk_trackable(trackable) without return types