code: def host_array_from_buffers(
      buffers: Iterable[bytes | bytearray | memoryview],
  ) -> memoryview:
      mvs = [memoryview(buf) for buf in buffers]
      out = host_array(sum(mv.nbytes for mv in mvs))
      offset = 0
      for mv in mvs:
          out[offset : offset + mv.nbytes] = mv.cast("B")
          offset += mv.nbytes
      return out
  
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 1 for calling a global function with example usage: host_array_from_buffers(buffers) and returns: out