Currently, the typing for writer parameter of SaveImage is Union[image_writer.ImageWriter, str, None]. But it is supposed to be some class, thus the image_writer.ImageWriter part in the Union should be Type[image_writer.ImageWriter] where Type is from typing module.
I can make a simple fix and submit a PR. Maybe we could check if there's any similar issue in other parts of the code base.