def METHOD_NAME(s, file=sys.stdout, nl=1):
    """
    printb(s)
    print a bytes object to stdout and flush
    """
    buf = file.buffer if hasattr(file, "buffer") else file
    buf.write(s)
    if nl:
        buf.write(b"\n")
    file.flush()