def METHOD_NAME(self, input):
    if isinstance(input, bytes):
        # Gaupol does not allow parsing from strings
        kwargs = {"delete": False}
        if self.filename:
            kwargs["suffix"] = self.filename
        temp_file = NamedTemporaryFile(**kwargs)
        temp_file.close()
        try:
            with open(temp_file.name, "wb") as fh:
                fh.write(input)
            self._parsefile(temp_file.name)
        finally:
            os.unlink(temp_file.name)
    else:
        self._parsefile(input)