def METHOD_NAME(self, method, path, **kwargs):
    # check Internet before and resolve issue with 60 seconds timeout
    ensure_internet_on(raise_exception=True)
    headers = kwargs.get("headers", {})
    with_authorization = (
        kwargs.pop("x_with_authorization")
        if "x_with_authorization" in kwargs
        else False
    )
    if with_authorization and "Authorization" not in headers:
        # pylint: disable=import-outside-toplevel
        from platformio.account.client import AccountClient
        headers["Authorization"] = (
            "Bearer %s" % AccountClient().fetch_authentication_token()
        )
    kwargs["headers"] = headers
    while True:
        try:
            return getattr(self._session, method)(path, **kwargs)
        except requests.exceptions.RequestException as exc:
            try:
                self._next_session()
            except Exception as exc2:
                raise HTTPClientError(str(exc2)) from exc