def METHOD_NAME(
    cls,
    target: Class,
    qname: str,
    attr_type: AttrType,
    parent_namespace: Optional[str] = None,
    tag: str = Tag.ELEMENT,
    sequence: int = 0,
):
    namespace, name = split_qname(qname)
    namespace = cls.select_namespace(namespace, parent_namespace, tag)
    index = len(target.attrs)
    attr = Attr(index=index, name=name, tag=tag, namespace=namespace)
    attr.types.append(attr_type)
    if sequence:
        attr.restrictions.path.append(("s", sequence, 1, sys.maxsize))
    attr.restrictions.min_occurs = 1
    attr.restrictions.max_occurs = 1
    cls.add_attribute(target, attr)