code: def _check_or_set_functions_opset_version(self, max_opset_version):
      funcs = list(self.functions.values())
      for func in funcs:
          if func.opset_version is None:
              func.opset_version = max_opset_version
          else:
              if func.opset_version < max_opset_version:
                  msg = "function should have at least opset_version {}. Got {}".format(
                      self._get_opset_str_value(max_opset_version),
                      self._get_opset_str_value(func.opset_version),
                  )
                  raise ValueError(msg)
      for func in funcs:
          if func.opset_version != funcs[0].opset_version:
              msg = "all functions must have the same opset_version. Got {} and {}.".format(
                  self._get_opset_str_value(func.opset_version),
                  self._get_opset_str_value(funcs[0].opset_version),
              )
              raise ValueError(msg)
  
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 7 for calling the Program obj's underlying member method code with example usage: obj._check_or_set_functions_opset_version(max_opset_version) without return types