code: def arrow_deserialize(
      numpy_bytes: bytes, decompressed_size: int, dtype: str
  ) -> np.ndarray:
      original_dtype = np.dtype(dtype)
      if flags.APACHE_ARROW_COMPRESSION is ApacheArrowCompression.NONE:
          reader = pa.BufferReader(numpy_bytes)
          numpy_bytes = reader.read_buffer()
      else:
          numpy_bytes = pa.decompress(
              numpy_bytes,
              decompressed_size=decompressed_size,
              codec=flags.APACHE_ARROW_COMPRESSION.value,
          )
  
      result = pa.ipc.read_tensor(numpy_bytes)
      np_array = result.to_numpy()
      np_array.setflags(write=True)
      return np_array.astype(original_dtype)
  
file_path: PySyft/packages/syft/src/syft/serde/arrow.py
imports: from typing import Union
  from typing import cast
  import numpy
  import pyarrow
  from ..util.experimental_flags import ApacheArrowCompression
  from ..util.experimental_flags import flags
  from .deserialize import _deserialize
  from .serialize import _serialize
label_desc: Use image node_id 2 for calling a global function with example usage: arrow_deserialize(numpy_bytes, decompressed_size, dtype) and returns: np_array