def METHOD_NAME(self, config_dict):
    if "path" in config_dict.keys():
        path_spec = config_dict["path"]
        if not isinstance(path_spec, str):
            raise ConfigError("path spec must be str but got {}.".format(type(path_spec)))
        if len(path_spec) <= 0:
            raise ConfigError("path spec must not be empty")
        class_path = format(path_spec)
        parts = class_path.split(".")
        if len(parts) < 2:
            raise ConfigError("invalid class path '{}': missing module name".format(class_path))
    else:
        if "name" not in config_dict:
            raise ConfigError("class name or path must be specified")
        class_name = config_dict["name"]
        if not isinstance(class_name, str):
            raise ConfigError("class name must be str but got {}.".format(type(class_name)))
        if len(class_name) <= 0:
            raise ConfigError("class name must not be empty")
        module_name = self.get_module_scanner().get_module_name(class_name)
        if module_name is None:
            raise ConfigError('Cannot find component class "{}"'.format(class_name))
        class_path = module_name + ".{}".format(class_name)
    return class_path