def METHOD_NAME(channel_first, interp, w, h):
    pil_resample = resample_dali2pil[interp]
    def resize(input):
        num_frames = input.shape[0]
        out_seq = []
        for i in range(num_frames):
            frame = input[i]
            if channel_first:
                frame = frame.transpose([1, 2, 0])
            out_frame = PIL.Image.fromarray(frame).resize([w, h], resample=pil_resample)
            out_frame = np.array(out_frame)
            if channel_first:
                out_frame = out_frame.transpose([2, 0, 1])
            out_seq.append(out_frame)
        return np.array(out_seq)
    return resize