def METHOD_NAME(cls, parent, cls_=None, **kwargs):
    """Method to add the blok in the registry under a type of declaration
    :param parent: An existing blok class in the Declaration
    :param ``cls_``: The ``class`` object to add in the Declaration
    :rtype: ``cls_``
    :exception: DeclarationsException
    """
    def wrapper(self):
        name = kwargs.get("name_", self.__name__)
        if parent.__declaration_type__ not in cls.declaration_types:
            raise DeclarationsException(
                "No parents %r for %s" % (parent, name)
            )  # pragma: no cover
        declaration = cls.declaration_types[parent.__declaration_type__]
        declaration.METHOD_NAME(parent, name, self, **kwargs)
        node = getattr(parent, name)
        setattr(node, "__declaration_type__", parent.__declaration_type__)
        setattr(
            node, "__registry_name__", parent.__registry_name__ + "." + name
        )
        # Only for auto doc with autoanyblok-declaration directive
        setattr(self, "__declaration__", declaration)
        setattr(
            self, "__registry_name__", parent.__registry_name__ + "." + name
        )
        return self
    if cls_:
        return wrapper(cls_)
    else:
        return wrapper