code: def array_to_craymessage(
      compressed_message: ndarray, shape: Sequence[int], tail_limit: int
  ) -> CrayCompressedMessage:
      """
      Convert a flattened message back to CrayCompressedMessage format.
  
      Args:
          compressed_message: Message to be unflattened.
          shape: Shape of original message (specifies shape of the head).
          tail_limit: Size of the tail.
  
      Returns:
          Message in standard CrayCompressedMessage format.
      """
      size = int(jnp.prod(jnp.array(shape)))
      head_highest, head_high, head_low, head_lowest, tail = jnp.split(
          compressed_message, [size, 2 * size, 3 * size, 4 * size]
      )
      head = (
          head_highest.astype(HEAD_DTYPE) << 3 * TAIL_PRECISION
          | head_high.astype(HEAD_DTYPE) << 2 * TAIL_PRECISION
          | head_low.astype(HEAD_DTYPE) << 1 * TAIL_PRECISION
          | head_lowest.astype(HEAD_DTYPE)
      )
      tail = CrayTail(jnp.array([tail_limit]), tail)
  
      return CrayCompressedMessage(jnp.reshape(head, size), tail)
  
imports: from typing import NamedTuple, Sequence, Tuple
  import jax.lax
  import jax.numpy
  from jax.numpy import ndarray
  from jax.random import PRNGKey, randint
label_desc: Use image node_id 9 for calling a global function with example usage: array_to_craymessage(compressed_message, shape, tail_limit) and returns: CrayCompressedMessage