<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def weld_array_op(array1, array2, result_type, operation):
 """Applies operation to each pair of elements in the arrays. Their lengths and types are assumed to be the same. Parameters array1 : numpy.ndarray or WeldObject Input array. array2 : numpy.ndarray or WeldObject Second input array. result_type : WeldType Weld type of the result. Expected to be the same as both input arrays. operation : {'+', '-', '*', '/', '&&', '||', 'pow'} Which operation to apply. Note bitwise operations (not included) seem to be bugged at the LLVM level. Returns ------- WeldObject Representation of this computation. """

    obj_id1, weld_obj = create_weld_object(array1)
    obj_id2 = get_weld_obj_id(weld_obj, array2)

    if operation == 'pow':
        action = 'pow(e.$0, e.$1)'
    else:
        action = 'e.$0 {operation} e.$1'.format(operation=operation)

    weld_template = """result(
    for(zip({array1}, {array2}), 
        appender[{type}], 
        |b: appender[{type}], i: i64, e: {{{type}, {type}}}| 
            merge(b, {action})
    )
)"""

    weld_obj.weld_code = weld_template.format(array1=obj_id1,
                                              array2=obj_id2,
                                              type=result_type,
                                              action=action)

    return weld_obj