code: def numpy_serialize(obj: np.ndarray) -> bytes:
      if obj.dtype.type != np.str_:
          return arrow_serialize(obj)
      else:
          return arraytonumpyutf8(obj)
  
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 5 for calling a global function with example usage: numpy_serialize(obj) and returns: arrow_serialize, arraytonumpyutf8