def rotation_multi(<EOL>x, rg=<NUM_LIT:20>, 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.>, order=<NUM_LIT:1><EOL>):
if is_random:<EOL><INDENT>theta = np.pi / <NUM_LIT> * np.random.uniform(-rg, rg)<EOL><DEDENT>else:<EOL><INDENT>theta = np.pi / <NUM_LIT> * rg<EOL><DEDENT>rotation_matrix = np.array([[np.cos(theta), -np.sin(theta), <NUM_LIT:0>], [np.sin(theta), np.cos(theta), <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(rotation_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>
Rotate multiple 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.rotation``.

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

    Examples
    --------
    >>> x, y --> [row, col, 1]  greyscale
    >>> x, y = tl.prepro.rotation_multi([x, y], rg=90, is_random=False)