class_docstr: Composes models from explicit model definitions.
  
  :param action_spaces_dict: Dict of sub-step id to action space.
  :param observation_spaces_dict: Dict of sub-step id to observation space.
  :param distribution_mapper_config: Distribution mapper configuration.
  :param policy: Mapping of sub-step keys to models.
  :param critic: Configuration for the critic composer.
docstr: Asserts the provided model config for consistency.
  :param model_config: The model config to check.
docstr_tok: ["Asserts","the","provided","model","config","for","consistency",".",":","param","model_config",":","The","model","config","to","check","."]
code: def check_model_config(cls, model_config: ConfigType) -> None:
      """Asserts the provided model config for consistency.
      :param model_config: The model config to check.
      """
      if (
          "policy" in model_config
          and model_config["policy"]
          and not isinstance(model_config["policy"], BasePolicyComposer)
      ):
          assert "_target_" in model_config["policy"]
          assert (
              "networks" in model_config["policy"]
          ), f"Custom models expect explicit policy networks! Check the model config!"
      if (
          "critic" in model_config
          and model_config["critic"]
          and not isinstance(
              model_config["critic"], CriticComposerInterface
          )
      ):
          assert "_target_" in model_config["critic"]
          assert (
              "networks" in model_config["critic"]
          ), f"Custom models expect explicit critic networks! Check the model config!"
  
imports: import copy
  from typing import Dict, Union, Optional, Mapping
  import gym
  import numpy
  from gym import spaces
  from maze.core.agent.state_critic_input_output import StateCriticStepInput
  from maze.core.agent.torch_policy import TorchPolicy
  from maze.core.agent.torch_state_action_critic import TorchStateActionCritic
  from maze.core.agent.torch_state_critic import TorchStateCritic
  from maze.core.annotations import override
  from maze.core.env.structured_env import StepKeyType, ActorID
  from maze.core.utils.factory import Factory, ConfigType
  from maze.perception.models.critics import BaseStateCriticComposer, SharedStateCriticComposer
  from maze.perception.models.critics.base_state_action_critic_composer import BaseStateActionCriticComposer
  from maze.perception.models.critics.critic_composer_interface import CriticComposerInterface
  from maze.perception.models.model_composer import BaseModelComposer
  from maze.perception.models.policies.base_policy_composer import BasePolicyComposer
  from maze.perception.perception_utils import map_nested_structure
label_desc: Use image node_id 1 for calling the CustomModelComposer obj's underlying member method code with example usage: obj.check_model_config(cls, model_config) without return types