code: def test_model_configs_for_keys(self):
      models_mapping = registry.mapping["model_name_mapping"]
  
      for model_key, model_cls in models_mapping.items():
          if model_cls.config_path() is None:
              warnings.warn(
                  (
                      "Model {} has no default configuration defined. "
                      + "Skipping it. Make sure it is intentional"
                  ).format(model_key)
              )
              continue
  
          with contextlib.redirect_stdout(StringIO()):
              args = dummy_args(model=model_key)
              configuration = Configuration(args)
              configuration.freeze()
              config = configuration.get_config()
  
              if model_key == "mmft":
                  continue
  
              self.assertTrue(
                  model_key in config.model_config,
                  "Key for model {} doesn't exists in its configuration".format(
                      model_key
                  ),
              )
  
file_path: mmf/tests/configs/test_configs_for_keys.py
imports: import contextlib
  import gc
  import unittest
  import warnings
  from io import StringIO
  from mmf.common.registry import registry
  from mmf.utils.configuration import Configuration
  from mmf.utils.env import setup_imports, teardown_imports
  from tests.test_utils import dummy_args
label_desc: Use image node_id 3 for calling the TestConfigsForKeys obj's underlying member method code with example usage: obj.test_model_configs_for_keys() without return types