def METHOD_NAME(self) -> None:
    # pylint: disable=consider-using-with
    # pylint: disable=too-many-branches
    import urllib.request
    import urllib.parse
    import urllib.error
    import json
    from efro.error import is_urllib_communication_error
    plus = babase.app.plus
    assert plus is not None
    response_data: Any = None
    url: str | None = None
    # Tearing the app down while this is running can lead to
    # rare crashes in LibSSL, so avoid that if at all possible.
    if not babase.shutdown_suppress_begin():
        # App is already shutting down, so we're a no-op.
        return
    try:
        classic = babase.app.classic
        assert classic is not None
        self._data = babase.utf8_all(self._data)
        babase.set_thread_name('BA_ServerCallThread')
        if self._request_type == 'get':
            url = (
                plus.get_master_server_address()
                + '/'
                + self._request
                + '?'
                + urllib.parse.urlencode(self._data)
            )
            assert url is not None
            response = urllib.request.urlopen(
                urllib.request.Request(
                    url,
                    None,
                    {'User-Agent': classic.legacy_user_agent_string},
                ),
                context=babase.app.net.sslcontext,
                timeout=babase.DEFAULT_REQUEST_TIMEOUT_SECONDS,
            )
        elif self._request_type == 'post':
            url = plus.get_master_server_address() + '/' + self._request
            assert url is not None
            response = urllib.request.urlopen(
                urllib.request.Request(
                    url,
                    urllib.parse.urlencode(self._data).encode(),
                    {'User-Agent': classic.legacy_user_agent_string},
                ),
                context=babase.app.net.sslcontext,
                timeout=babase.DEFAULT_REQUEST_TIMEOUT_SECONDS,
            )
        else:
            raise TypeError('Invalid request_type: ' + self._request_type)
        # If html request failed.
        if response.getcode() != 200:
            response_data = None
        elif self._response_type == MasterServerResponseType.JSON:
            raw_data = response.read()
            # Empty string here means something failed server side.
            if raw_data == b'':
                response_data = None
            else:
                response_data = json.loads(raw_data)
        else:
            raise TypeError(f'invalid responsetype: {self._response_type}')
    except Exception as exc:
        # Ignore common network errors; note unexpected ones.
        if not is_urllib_communication_error(exc, url=url):
            print(
                f'Error in MasterServerCallThread'
                f' (url={url},'
                f' response-type={self._response_type},'
                f' response-data={response_data}):'
            )
            import traceback
            traceback.print_exc()
        response_data = None
    finally:
        babase.shutdown_suppress_end()
    if self._callback is not None:
        babase.pushcall(
            babase.Call(self._run_callback, response_data),
            from_other_thread=True,
        )