<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_local_arrays_on_cube(cube, reified_arrays=None, array_stitch=None, array_factory=None):
 """ Function that creates arrays on the supplied hypercube, given the supplied reified_arrays dictionary and array_stitch and array_factory functions. Arguments --------- cube : HyperCube A hypercube object on which arrays will be created. Keyword Arguments reified_arrays : dictionary Dictionary keyed on array name and array definitions. If None, obtained from cube.arrays(reify=True) array_stitch : function A function that stitches array objects onto the cube object. It's signature should be array_stitch(cube, arrays) where cube is a HyperCube object and arrays is a dictionary containing array objects keyed by their name. If None, a default function will be used that creates python descriptors associated with the individual array objects. array_factory : function A function that creates array objects. It's signature should be array_factory(shape, dtype) and should return a constructed array of the supplied shape and data type. If None, numpy.empty will be used. Returns ------- A dictionary of array objects, keyed on array names """


    # Create a default array stitching method
    if array_stitch is None:
        array_stitch = generic_stitch

    # Get reified arrays from the cube if necessary
    if reified_arrays is None:
        reified_arrays = cube.arrays(reify=True)

    arrays = create_local_arrays(reified_arrays, array_factory=array_factory)
    array_stitch(cube, arrays)

    return arrays