code: def _get_const_value(op, arg, co_consts):
      """Helper to get the value of the const in a hasconst op.
  
      Returns the dereferenced constant if this is possible.
      Otherwise (if it is a LOAD_CONST and co_consts is not
      provided) returns the dis.UNKNOWN sentinel.
      """
      assert op in hasconst
  
      argval = UNKNOWN
      if op == LOAD_CONST:
          if co_consts is not None:
              argval = co_consts[arg]
      return argval
  
imports: import sys
  import types
  import collections
  import io
  from opcode import *
  from opcode import __all__, _cache_format, _inline_cache_entries, _nb_ops, _specializations, _specialized_instructions
label_desc: Use image node_id 12 for calling a global function with example usage: _get_const_value(op, arg, co_consts) and returns: argval