'Execute `command` and return the response.'

@classmethod
def telnet_request(cls, telnet, command, expected_prefix):

    try:
        telnet.write((command.encode('ASCII') + '\r'))
    except telnetlib.socket.timeout:
        _LOGGER.debug('Pioneer    command    %s    timed    out', command)
        return None
    for _ in range(3):
        result = telnet.read_until('\r\n', timeout=0.2).decode('ASCII').strip()
        if result.startswith(expected_prefix):
            return result
    return None
