def __init__(self, op_type, match_criterion=None):
        """
        Parameters
        ----------

        param op_type : Type of an operation.
        param match_criterion : A callable function that matches a MIL op and returns a boolean.

        Examples
        --------

        .. sourcecode:: python

            CastOptimizationNode("mul"),
            CastOptimizationNode("round"),
            CastOptimizationNode("add", lambda op: op.y.val == 0),
            CastOptimizationNode("clip", lambda op: op.alpha.val == -128 and op.beta.val == 127),
            CastOptimizationNode("cast", lambda op: op.dtype.val == "int8"),
            CastOptimizationNode("cast", lambda op: op.dtype.val == "fp32"),

        """

        self.op_type = op_type
        if not match_criterion:
            match_criterion = lambda op: True

        self.match_criterion = match_criterion

        Parameters
        ----------

        param op_type : Type of an operation.
        param match_criterion : A callable function that matches a MIL op and returns a boolean.

        Examples
        --------

        .. sourcecode:: python

            CastOptimizationNode("mul"),
            CastOptimizationNode("round"),
            CastOptimizationNode("add", lambda op: op.y.val == 0),
            CastOptimizationNode("clip", lambda op: op.alpha.val == -128 and op.beta.val == 127),
            CastOptimizationNode("cast", lambda op: op.dtype.val == "int8"),
            CastOptimizationNode("cast", lambda op: op.dtype.val == "fp32"),

        
coremltools/converters/mil/mil/passes/defs/optimize_repeat_ops.py