code: def array_to_binary(ar, obj=None, force_contiguous=True):
      if ar is None:
          return None
      if ar.dtype.kind not in ["u", "i", "f"]:  # ints and floats
          raise ValueError("unsupported dtype: %s" % (ar.dtype))
      # WebGL does not support float64, case it here
      if ar.dtype == np.float64:
          ar = ar.astype(np.float32)
      # JS does not support int64
      if ar.dtype == np.int64:
          ar = ar.astype(np.int32)
      # make sure it's contiguous
      if force_contiguous and not ar.flags["C_CONTIGUOUS"]:
          ar = np.ascontiguousarray(ar)
      return {
          # binary data representation of a numpy matrix
          "value": memoryview(ar),
          # dtype convertible to a typed array
          "dtype": str(ar.dtype),
          # height of np matrix
          "length": ar.shape[0],
          # width of np matrix
          "size": 1 if len(ar.shape) == 1 else ar.shape[1],
      }
  
label_desc: Use image node_id 1 for calling a global function with example usage: array_to_binary(ar, obj, force_contiguous) and returns: dict, None