def METHOD_NAME(cls, query, timeout=2.0, decode=True, fwparams=dict()):
    if timeout:
        cls._sock.settimeout(timeout)
    try:
        cls._sock.send(query.to_wire())
        data = cls._sock.recv(4096)
    except socket.timeout:
        data = None
    finally:
        if timeout:
            cls._sock.settimeout(None)
    message = None
    if data:
        if not decode:
            return data
        message = dns.message.from_wire(data, **fwparams)
    return message