def METHOD_NAME(self, query_string):
    from enhydris.telemetry import TelemetryError
    if hasattr(self, "session_id"):
        query_string = f"{query_string}&session-id={self.session_id}"
    url = f"{self.telemetry.device_locator}/addUPI?{query_string}"
    with requests.get(url, verify=False) as response:
        try:
            response.raise_for_status()
            # Note: Do not use response.text; use response.content.
            # The Adcon Gateway might not specify the encoding in the HTTP response
            # headers, and requests (which doesn't speak XML) will often assume the
            # wrong encoding when decoding response.content to response.text.
            # However, the encoding is correctly specified in the XML itself, and
            # if ElementTree.fromstring() is fed the undecoded response.content,
            # it reads it correctly.
            xmlroot = ElementTree.fromstring(response.content)
            error = xmlroot.find("error")
            if error is not None:
                raise requests.RequestException(error.attrib["msg"])
            return xmlroot
        except requests.RequestException as e:
            raise TelemetryError(str(e))