          """ If the writer supports pre-encoding then override this to pre-encode
              the image in lib/convert.py to speed up saving """
          return None
  
      def close(self):
          """ Override for specific frame writing close methods """
          raise NotImplementedError
 
</s> remove     def pre_encode(self, image):  # pylint: disable=unused-argument,no-self-use
        """ If the writer supports pre-encoding then override this to pre-encode
            the image in lib/convert.py to speed up saving """
 </s> add     def pre_encode(self, image) -> None:  # pylint: disable=unused-argument,no-self-use
        """ Some writer plugins support the pre-encoding of images prior to saving out. As
        patching is done in multiple threads, but writing is done in a single thread, it can
        speed up the process to do any pre-encoding as part of the converter process.

        If the writer supports pre-encoding then override this to pre-encode the image in
        :module:`lib.convert` to speed up saving.

        Parameters
        ----------
        image: :class:`numpy.ndarray`
            The converted image that is to be run through the pre-encoding function

        Returns
        -------
        python function or ``None``
            If ``None`` then the writer does not support pre-encoding, otherwise return the python
            function that will pre-encode the image
        """ </s> remove     def write(self, filename, image):
        """ Override for specific frame writing method """
 </s> add     def write(self, filename: str, image) -> None:
        """ Override for specific frame writing method.

        Parameters
        ----------
        filename: str
            The incoming frame filename.
        image: :class:`numpy.ndarray`
            The converted image to be written
        """ </s> remove def get_config(plugin_name, configfile=None):
    """ Return the config for the requested model """
 </s> add def get_config(plugin_name: str, configfile: Optional[str] = None) -> dict:
    """ Obtain the configuration settings for the writer plugin.

    Parameters
    ----------
    plugin_name: str
        The name of the convert plugin to return configuration settings for
    configfile: str, optional
        The full path to a custom configuration ini file. If ``None`` is passed
        then the file is loaded from the default location. Default: ``None``.

    Returns
    -------
    dict
        The requested configuration dictionary
    """ </s> remove     def cache_frame(self, filename, image):
        """ Add the incoming frame to the cache """
 </s> add     def cache_frame(self, filename, image) -> None:
        """ Add the incoming converted frame to the cache ready for writing out.

        Used for ffmpeg and gif writers to ensure that the frames are written out in the correct
        order.

        Parameters
        ----------
        filename: str
            The filename of the incoming frame, where the frame index can be extracted from
        image: class:`numpy.ndarray`
            The converted frame corresponding to the given filename
        """ </s> remove         self.writer.close()
        self.mux_audio()
 </s> add         self._writer.close()
        self._mux_audio()

    def _mux_audio(self) -> None:
        """ Mux audio the audio to the generated video temp file.
    def close(self) -> None:
        """ Override for specific converted frame writing close methods """
          """ If the writer supports pre-encoding then override this to pre-encode
              the image in lib/convert.py to speed up saving """
          return None
  
    def close(self) -> None:
        """ Override for specific converted frame writing close methods """
    def close(self) -> None:
        """ Override for specific converted frame writing close methods """
          raise NotImplementedError
keep keep keep keep replace replace keep
 ffmpeg writer: Create new filename if output pre-exists 
plugins/convert/writer/_base.py