def _check_invalid_opset(self):
        """
        Check if the program consists of opsets not supported by runtime.
        """
        dialect_namespaces = self._get_dialect_namespaces()
        if len(dialect_namespaces) != 0:
            for dialect_key in list(dialect_namespaces.keys()):
                if dialect_key not in self._get_runtime_supported_dialect_opset():
                    invalid_op = dialect_namespaces[dialect_key][0]
                    raise ValueError(
                        f'Core ML only support core opset. Got unsupported op "{invalid_op.name}" with type "{invalid_op.op_type}" of dialect namespace "{invalid_op._dialect_namespace}".'
                    )

        Check if the program consists of opsets not supported by runtime.
        
coremltools/converters/mil/mil/program.py