code: def _configurations_from_objects(m) -> Dict[str, ModelConfiguration]:
      if inspect.isclass(m) and issubclass(m, Asset):
          return {
              key: ModelConfiguration(**config, model_type=m)
              for key, config in m.CONFIGURATIONS.items()
          }
      elif isinstance(m, (list, tuple)):
          return dict(
              ChainMap(
                  *(_configurations_from_objects(sub_m) for sub_m in m)
              )
          )
      elif isinstance(m, ModuleType):
          return dict(
              ChainMap(
                  *(
                      _configurations_from_objects(sub_m)
                      for sub_m in walk_objects(m)
                  )
              )
          )
      elif isinstance(m, str):
          models = [
              importlib.import_module(modname)
              for modname in m.split(",")
          ]
          return _configurations_from_objects(models)
      else:
          raise ValueError(f"Don't know how to configure {m}")
  
file_path: modelkit/modelkit/core/model_configuration.py
imports: import importlib
  import inspect
  import os
  import pkgutil
  from collections import ChainMap
  from types import ModuleType
  from typing import Any, Dict, List, Mapping, Optional, Set, Type, Union
  import pydantic
  from structlog import get_logger
  from modelkit.core.model import Asset
  from modelkit.core.settings import ModelkitSettings
  from modelkit.core.types import LibraryModelsType
label_desc: Use image node_id 3 for calling a global function with example usage: _configurations_from_objects(m) and returns: unknown, dict, dict, _configurations_from_objects