def _build_config(config_cls, property_path=None):
if not property_path:<EOL><INDENT>property_path = []<EOL><DEDENT>if not is_config_type(config_cls):<EOL><INDENT>raise ValueError(f"<STR_LIT>")<EOL><DEDENT>schema = {"<STR_LIT:type>": "<STR_LIT:object>", "<STR_LIT>": [], "<STR_LIT>": {}}<EOL>cls_entry = getattr(config_cls, CONFIG_KEY)<EOL>schema_title = cls_entry.get("<STR_LIT:title>", config_cls.__qualname__)<EOL>if isinstance(schema_title, str):<EOL><INDENT>schema["<STR_LIT:title>"] = schema_title<EOL><DEDENT>schema_description = cls_entry.get("<STR_LIT:description>")<EOL>if isinstance(schema_description, str):<EOL><INDENT>schema["<STR_LIT:description>"] = schema_description<EOL><DEDENT>if len(property_path) <= <NUM_LIT:0>:<EOL><INDENT>schema["<STR_LIT>"] = f"<STR_LIT>"<EOL>schema["<STR_LIT>"] = "<STR_LIT>"<EOL><DEDENT>else:<EOL><INDENT>schema["<STR_LIT>"] = f"<STR_LIT>"<EOL><DEDENT>property_path.append("<STR_LIT>")<EOL>for var in attr.fields(config_cls):<EOL><INDENT>if not is_config_var(var):<EOL><INDENT>continue<EOL><DEDENT>entry = var.metadata[CONFIG_KEY]<EOL>var_name = entry.name if entry.name else var.name<EOL>if entry.required:<EOL><INDENT>schema["<STR_LIT>"].append(var_name)<EOL><DEDENT>if is_config_type(var.type):<EOL><INDENT>schema["<STR_LIT>"][var_name] = _build_config(<EOL>var.type, property_path=property_path + [var_name]<EOL>)<EOL><DEDENT>else:<EOL><INDENT>schema["<STR_LIT>"][var_name] = _build_var(<EOL>var, property_path=property_path<EOL>)<EOL><DEDENT><DEDENT>return schema<EOL>
Builds the schema definition for a given config class.

    :param class config_cls: The config class to build a schema definition for
    :param List[str] property_path: The property path of the current type,
        defaults to None, optional
    :raises ValueError: When the given ``config_cls`` is not a config decorated class
    :return: The built schema definition
    :rtype: Dict[str, Any]