def METHOD_NAME(
    cmd: str, ack: str, device_connection: Serial, tag: Optional[str] = None
) -> str:
    """Writes to a serial device.
    - Formats command
    - Wait for ack return
    - return parsed response"""
    if not tag:
        tag = device_connection.port
    encoded_write = cmd.encode()
    encoded_ack = ack.encode()
    log.debug(f"{tag}: Write -> {encoded_write!r}")
    device_connection.write(encoded_write)
    response = device_connection.read_until(encoded_ack)
    log.debug(f"{tag}: Read <- {response}")
    if encoded_ack not in response:
        log.warning(f"{tag}: timed out after {device_connection.timeout}")
        raise SerialNoResponse(
            "No response from serial port after {} second(s)".format(
                device_connection.timeout
            )
        )
    clean_response = _parse_serial_response(response, encoded_ack)
    if clean_response:
        return clean_response.decode()
    return ""