code: def pack_frames(
      frames: Collection[bytes | bytearray | memoryview],
  ) -> bytes:
      """Pack frames into a byte-like object
  
      This prepends length information to the front of the bytes-like object
  
      See Also
      --------
      unpack_frames
      """
      return b"".join([pack_frames_prelude(frames), *frames])
  
file_path: distributed/distributed/protocol/utils.py
imports: from __future__ import annotations
  import ctypes
  import struct
  from collections.abc import Collection, Iterable, Sequence
  from typing import Literal, overload
  import dask
  from distributed.utils import nbytes
label_desc: Use image node_id 4 for calling a global function with example usage: pack_frames(frames) and returns: bytes