code: def _block_info_recursion(arrays, max_depth, result_ndim, depth=0):
      """
      Returns the shape of the final array, along with a list
      of slices and a list of arrays that can be used for assignment inside the
      new array
  
      Parameters
      ----------
      arrays : nested list of arrays
          The arrays to check
      max_depth : list of int
          The number of nested lists
      result_ndim: int
          The number of dimensions in thefinal array.
  
      Returns
      -------
      shape : tuple of int
          The shape that the final array will take on.
      slices: list of tuple of slices
          The slices into the full array required for assignment. These are
          required to be prepended with ``(Ellipsis, )`` to obtain to correct
          final index.
      arrays: list of ndarray
          The data to assign to each slice of the full array
  
      """
      if depth < max_depth:
          shapes, slices, arrays = zip(
              *[
                  _block_info_recursion(
                      arr, max_depth, result_ndim, depth + 1
                  )
                  for arr in arrays
              ]
          )
  
          axis = result_ndim - max_depth + depth
          shape, slice_prefixes = _concatenate_shapes(shapes, axis)
  
          # Prepend the slice prefix and flatten the slices
          slices = [
              slice_prefix + the_slice
              for slice_prefix, inner_slices in zip(
                  slice_prefixes, slices
              )
              for the_slice in inner_slices
          ]
  
          # Flatten the array list
          arrays = functools.reduce(operator.add, arrays)
  
          return shape, slices, arrays
      else:
          # We've 'bottomed out' - arrays is either a scalar or an array
          # type(arrays) is not list
          # Return the slice and the array inside a list to be consistent with
          # the recursive case.
          arr = _atleast_nd(arrays, result_ndim)
          return arr.shape, [()], [arr]
  
imports: from __future__ import division, absolute_import, print_function
  import functools
  import operator
  import types
  import warnings
  from .None import numeric
  from .None import overrides
  from .numeric import array, asanyarray, newaxis
  from .multiarray import normalize_axis_index
label_desc: Use image node_id 19 for calling a global function with example usage: _block_info_recursion(arrays, max_depth, result_ndim, depth) and returns: shape,  slices,  arrays, arr,  list,  list