code: def _block_slicing(arrays, list_ndim, result_ndim):
      shape, slices, arrays = _block_info_recursion(
          arrays, list_ndim, result_ndim
      )
      dtype = np.result_type(*[arr.dtype for arr in arrays])
  
      # Test preferring F only in the case that all input arrays are F
      F_order = all(arr.flags["F_CONTIGUOUS"] for arr in arrays)
      C_order = all(arr.flags["C_CONTIGUOUS"] for arr in arrays)
      order = "F" if F_order and not C_order else "C"
      result = empty(shape=shape, dtype=dtype, order=order)
      # Note: In a c implementation, the function
      # PyArray_CreateMultiSortedStridePerm could be used for more advanced
      # guessing of the desired order.
  
      for the_slice, arr in zip(slices, arrays):
          result[(Ellipsis,) + the_slice] = arr
      return result
  
file_path: mars/mars/tensor/merge/block.py
imports: import functools
  import itertools
  import operator
  import numpy
  from ..datasource.empty import empty
  from ..datasource.array import array
label_desc: Use image node_id 10 for calling a global function with example usage: _block_slicing(arrays, list_ndim, result_ndim) and returns: result