def __init__(self, on_dump):
super().__init__(self._dump_to_file)<EOL>self.__dump_object = on_dump<EOL>
Create a new JSONDumper object with the callable `on_dump`.

        `on_dump` takes no arguments and returns the object that should be
        serialized to JSON.