code: def _check_ops_version_compatibility(self, max_opset_version):
      def check_version_compatibility_block(block):
          for op in list(block.operations):
              for b in op.blocks:
                  check_version_compatibility_block(b)
              if not hasattr(op, "_op_variants") or not isinstance(
                  op._op_variants, dict
              ):
                  continue
              expected_op_cls = _get_version_of_op(
                  op._op_variants, max_opset_version
              )
              if type(op) is not expected_op_cls:
                  msg = (
                      "Op {} with an out of date version {} is detected. Please use @mb.program(input_specs=..., "
                      "opset_version={})"
                  ).format(
                      op.op_type,
                      self._get_opset_str_value(op.opset_version),
                      self._get_opset_str_value(max_opset_version),
                  )
                  raise ValueError(msg)
  
      for func in self.functions.values():
          check_version_compatibility_block(func)
  
imports: from collections import defaultdict
  from typing import Dict, List
  import numpy
  import sympy
  from coremltools import _logger
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from coremltools.converters.mil.input_types import InputType
  from coremltools.converters.mil.mil.input_type import InternalInputType
  from coremltools.converters.mil.mil.ops.helper import _get_version_of_op
  from coremltools.converters.mil.mil.var import ListVar
  from .None import types
  from .block import Function
  from .operation import Operation
  from .types.symbolic import k_num_internal_syms, k_used_symbols
  from .var import Var
label_desc: Use image node_id 6 for calling the Program obj's underlying member method code with example usage: obj._check_ops_version_compatibility(max_opset_version) without return types