def register_pass(namespace: Text, override: bool = False, name: Optional[Text] = None):
    """
    namespaces like {'common', 'nn_backend', <other-backends>, <other-frontends>}

    Params:
        override: indicate the graph pass can override an existing pass with the same name.
        name: name of the graph pass. Default to class name if not provided
    """

    def class_wrapper(pass_cls: Type[AbstractGraphPass]):
        PASS_REGISTRY.add(namespace, pass_cls, override, name)
        return pass_cls

    return class_wrapper

    namespaces like {'common', 'nn_backend', <other-backends>, <other-frontends>}

    Params:
        override: indicate the graph pass can override an existing pass with the same name.
        name: name of the graph pass. Default to class name if not provided
    
coremltools/converters/mil/mil/passes/pass_registry.py