flush Method
Forces any pending segments to be written to the output stream without closing it.
Syntax
def flush() -> None: ...
Remarks
The on_flush method forces the component to write the last created segment to the output stream and then flush the output stream.