code: def convert_to_embedded(
      compressed_messages: Sequence[ndarray],
      message_shape: Sequence[int],
      tail_capacity: int,
  ) -> Tuple[ndarray, ndarray]:
      """
      Embed a truncated list of byte arrays into equal-size arrays.
  
      Args:
          compressed_messages: Packed message to embed into a standard-length.
          message_shape: Shape of unpacked message.
          tail_capacity: Desired size of the tail.
  
      Returns:
          A 2-tuple containing:
              A full-length stack with the message embedded into constant sizes
                  via zero-padding.
              A list of integers pointing to the end of each tail.
      """
      embedded_messages = []
      tail_limits = []
      for cm in compressed_messages:
          cm_conv, tail_limit = insert_zeros(
              cm, message_shape, tail_capacity
          )
          embedded_messages.append(cm_conv)
          tail_limits.append(tail_limit)
  
      return jnp.stack(embedded_messages), jnp.stack(tail_limits)
  
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 11 for calling a global function with example usage: convert_to_embedded(compressed_messages, message_shape, tail_capacity) and returns: jnp,  jnp