def METHOD_NAME(self, data):  # type: (Union[str, bytes]) -> None
    try:
        if self.decode_output:
            self.output.write(data.decode())  # type: ignore
        else:
            self.output.write(data)  # type: ignore
    except (IOError, OSError):
        # Windows 10 bug since the Fall Creators Update, sometimes writing to console randomly throws
        # an exception (however, the character is still written to the screen)
        # Ref https://github.com/espressif/esp-idf/issues/1163
        #
        # Also possible for Windows to throw an OSError error if the data is invalid for the console
        # (garbage bytes, etc)
        pass
    except UnicodeDecodeError:
        # In case of double byte Unicode characters display '?'
        self.output.write('?')  # type: ignore