def METHOD_NAME(declaration: "Declaration", definition: DeclarationDict):
    """Load declarations from dictionary.
    """
    from ckan.logic.schema import config_declaration_v1
    from ckan.logic import ValidationError
    from ckan.lib.navl.dictization_functions import validate
    version = definition["version"]
    if version == 1:
        data, errors = validate(dict(definition), config_declaration_v1())
        if errors:
            raise ValidationError(errors)
        for group in data["groups"]:
            if group["annotation"]:
                declaration.annotate(group["annotation"]).set_section(
                    group["section"]
                )
            for details in group["options"]:
                factory = option_types[details["type"]]
                option: Option[Any] = getattr(declaration, factory)(
                    details["key"], details.get("default")
                )
                option.set_section(group["section"])
                option.append_validators(details["validators"])
                option.legacy_key = details.get("legacy_key")
                extras = details.setdefault("__extras", {})
                for flag in Flag:
                    if extras.get(flag.name):
                        option.set_flag(flag)
                if details["description"]:
                    option.set_description(details["description"])
                if details["placeholder"]:
                    option.set_placeholder(details["placeholder"])
                if "example" in details:
                    option.example = details["example"]
                if "default_callable" in details:
                    args = details.get("callable_args", {})
                    default = details["default_callable"](**args)
                    option.set_default(default)
                if "placeholder_callable" in details:
                    args = details.get("callable_args", {})
                    placeholder = details["placeholder_callable"](**args)
                    option.set_placeholder(placeholder)