def METHOD_NAME(
    _type: typing.Type, tag_name: str = None, ns_prefix: str = None
):
    class _Def(_type):  # type:ignore
        def __init__(self, *args, **kwargs):
            super().__init__(*args, **kwargs)
            if tag_name is not None:
                self.original_tagname_ = tag_name
            if ns_prefix is not None:
                self.ns_prefix_ = ns_prefix
    return type(_type.__name__, (_Def,), {})