<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generic_stitch(cube, arrays):
 """ Creates descriptors associated with array name and then sets the array as a member variable """

    
    for name, ary in arrays.iteritems():
        if name not in type(cube).__dict__:
            setattr(type(cube), name, ArrayDescriptor(name))

        setattr(cube, name, ary)