code: def _msgpack_ext_unpack(code, data):
      """Messagepack decoders for custom types."""
      if code == _MsgpackExtType.ndarray:
          return _ndarray_from_bytes(data)
      elif code == _MsgpackExtType.native_complex:
          complex_tuple = msgpack.unpackb(data)
          return complex(complex_tuple[0], complex_tuple[1])
      elif code == _MsgpackExtType.npscalar:
          ar = _ndarray_from_bytes(data)
          return ar[()]  # unpack ndarray to scalar
      return msgpack.ExtType(code, data)
  
imports: import enum
  import threading
  from contextlib import contextmanager
  from typing import Any, Dict, List
  import jax
  import msgpack
  import numpy
label_desc: Use image node_id 17 for calling a global function with example usage: _msgpack_ext_unpack(code, data) and returns: msgpack, _ndarray_from_bytes, complex, ar