def METHOD_NAME(
    item,
    prefix: str,
    special_prefixes: dict = None,
    item_name: str = None,
):
    if special_prefixes is None:
        special_prefixes = {}
    if isinstance(item, list):
        [
            METHOD_NAME(child, prefix, special_prefixes, item_name)
            for child in item
        ]
    elif hasattr(item, "export"):
        item.ns_prefix_ = prefix
        children_prefix = special_prefixes.get(f"{item_name}_children", prefix)
        children = [
            (name, node)
            for name, node in item.__dict__.items()
            if name[-1:] != "_" and node is not None
        ]
        for name, node in children:
            special_prefix = special_prefixes.get(name, children_prefix)
            setattr(item, f"{name}_nsprefix_", special_prefix)
            METHOD_NAME(node, special_prefix, special_prefixes, name)