def write_and_return(
        command, ack, serial_connection, timeout=DEFAULT_WRITE_TIMEOUT):
    '''Write a command and return the response'''
    clear_buffer(serial_connection)
    with serial_with_temp_timeout(
            serial_connection, timeout) as device_connection:
        response = _write_to_device_and_return(command, ack, device_connection)
    return response
def write_and_return ( command , ack , serial_connection , timeout = DEFAULT_WRITE_TIMEOUT ) : clear_buffer ( serial_connection ) with serial_with_temp_timeout ( serial_connection , timeout ) as device_connection : response = _write_to_device_and_return ( command , ack , device_connection ) return response
Write a command and return the response