def create_animation(ims):
    fig = plt.figure(figsize=(16, 12))
    plt.axis('off')
    im = plt.imshow(ims[0])

    def animate_func(i):
        im.set_array(ims[i])
        return [im]
    return animation.FuncAnimation(fig, animate_func, frames=len(ims), interval=(1000 // 12))
def create_animation(ims):
    fig = plt.figure(figsize=(16, 12))
    plt.axis('off')
    im = plt.imshow(ims[0])

    def animate_func(i):
        im.set_array(ims[i])
        return [im]
    return animation.FuncAnimation(fig, animate_func, frames=len(ims), interval=(1000 // 12))