code: def curr_opset_version():
      block = curr_block()
      while not isinstance(block, Function):
          block = block.outer_op.enclosing_block
      return block.opset_version
  
imports: import copy
  from collections import Counter, OrderedDict
  from typing import Tuple
  from coremltools import _OPSET
  from coremltools import _logger
  from coremltools.converters.mil._deployment_compatibility import AvailableTarget
  from .None import SPACES, types
  from .operation import Operation
  from .types.symbolic import is_symbolic, k_used_symbols
  from .var import ComplexVar, InternalVar, Var
  from .visitors.dot_visitor import DotVisitor
label_desc: Use image node_id 2 for calling a global function with example usage: curr_opset_version() and returns: block