def METHOD_NAME(self, buf, timeout=500):
    self.send_start(buf)
    start = utime.ticks_ms()
    result = None
    while result is None and utime.ticks_diff(utime.ticks_ms(), start) < timeout:
        result = self.send_done()  # 1 == success, 2 == fail
    if result == 2:
        raise OSError("send failed")