def add_op(cls, **kwargs):
                """
                An utility function that help the builder to pickup the correct op class when calling ``mb.op``

                There are two cases:

                (1) custom op / dialect op:
                    If the op is a custom op or a dialect op, we could directly pick up the op class through
                    ``SSAOpRegistry.custom_ops[op_type]`` or  ``SSAOpRegistry.dialect_ops[op_type]``

                (2) core op:
                    For the core op, the builder would pick up the correct version according to ``curr_opset_version()``
                """
                op_cls_to_add = None
                is_core_op = (op_reg == SSAOpRegistry.core_ops)
                if is_core_op:
                    op_cls_to_add = SSAOpRegistry._get_core_op_cls(op_type)
                else:
                    op_cls_to_add = op_reg[op_type]

                return cls._add_op(op_cls_to_add, **kwargs)

                An utility function that help the builder to pickup the correct op class when calling ``mb.op``

                There are two cases:

                (1) custom op / dialect op:
                    If the op is a custom op or a dialect op, we could directly pick up the op class through
                    ``SSAOpRegistry.custom_ops[op_type]`` or  ``SSAOpRegistry.dialect_ops[op_type]``

                (2) core op:
                    For the core op, the builder would pick up the correct version according to ``curr_opset_version()``
                
coremltools/converters/mil/mil/ops/registry.py