def make_animated_gif(title: str, g: list[Node], dst_file: str, fs: list[Node], bs: list[Node], shortest: list[Node], draw_edges: bool=True, writer: str='ffmpeg', interval: int=250, blinking_ratio=0.5):
    '\n    Makes an animated gif out of two sequences of forward (fs) and backward (bs)\n    path-finding algorithm. The final shortest path will be blinked.\n    '
    anim = Animator(g, title=title, draw_edges=draw_edges)

    def node_gen():
        for (fn, bn) in zip(fs, bs):
            (yield (fn, bn, []))
        res = [g[i] for i in shortest]
        for _ in range(int((len(fs) * blinking_ratio))):
            (yield (_, _, res))
    ani = animation.FuncAnimation(anim.fig, anim.update, node_gen(), interval=interval, blit=True, repeat_delay=500, save_count=(len(fs) * 2))
    ani.save(f'imgs/{dst_file}', writer=writer)
Makes an animated gif out of two sequences of forward (fs) and backward (bs)
path-finding algorithm. The final shortest path will be blinked.
def make_animated_gif(title: str, g: list[Node], dst_file: str, fs: list[Node], bs: list[Node], shortest: list[Node], draw_edges: bool=True, writer: str='ffmpeg', interval: int=250, blinking_ratio=0.5):
    '\n    Makes an animated gif out of two sequences of forward (fs) and backward (bs)\n    path-finding algorithm. The final shortest path will be blinked.\n    '
    anim = Animator(g, title=title, draw_edges=draw_edges)

    def node_gen():
        for (fn, bn) in zip(fs, bs):
            (yield (fn, bn, []))
        res = [g[i] for i in shortest]
        for _ in range(int((len(fs) * blinking_ratio))):
            (yield (_, _, res))
    ani = animation.FuncAnimation(anim.fig, anim.update, node_gen(), interval=interval, blit=True, repeat_delay=500, save_count=(len(fs) * 2))
    ani.save(f'imgs/{dst_file}', writer=writer)