def shear_multi2(<EOL>x, shear=(<NUM_LIT:0.1>, <NUM_LIT:0.1>), is_random=False, row_index=<NUM_LIT:0>, col_index=<NUM_LIT:1>, channel_index=<NUM_LIT:2>, fill_mode='<STR_LIT>', cval=<NUM_LIT:0.>,<EOL>order=<NUM_LIT:1><EOL>):
if len(shear) != <NUM_LIT:2>:<EOL><INDENT>raise AssertionError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>if isinstance(shear, tuple):<EOL><INDENT>shear = list(shear)<EOL><DEDENT>if is_random:<EOL><INDENT>shear[<NUM_LIT:0>] = np.random.uniform(-shear[<NUM_LIT:0>], shear[<NUM_LIT:0>])<EOL>shear[<NUM_LIT:1>] = np.random.uniform(-shear[<NUM_LIT:1>], shear[<NUM_LIT:1>])<EOL><DEDENT>shear_matrix = np.array([[<NUM_LIT:1>, shear[<NUM_LIT:0>], <NUM_LIT:0>], [shear[<NUM_LIT:1>], <NUM_LIT:1>, <NUM_LIT:0>], [<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:1>]])<EOL>h, w = x[<NUM_LIT:0>].shape[row_index], x[<NUM_LIT:0>].shape[col_index]<EOL>transform_matrix = transform_matrix_offset_center(shear_matrix, h, w)<EOL>results = []<EOL>for data in x:<EOL><INDENT>results.append(affine_transform(data, transform_matrix, channel_index, fill_mode, cval, order))<EOL><DEDENT>return np.asarray(results)<EOL>
Shear images with the same arguments, randomly or non-randomly.
    Usually be used for image segmentation which x=[X, Y], X and Y should be matched.

    Parameters
    -----------
    x : list of numpy.array
        List of images with dimension of [n_images, row, col, channel] (default).
    others : args
        See ``tl.prepro.shear2``.

    Returns
    -------
    numpy.array
        A list of processed images.