def METHOD_NAME(url: str, character_encoding: Optional[str] = None, force: bool = False, retry: bool = False, session: Optional[requests.Session] = None) -> str:
    headers = {}
    if force:
        headers['Cache-Control'] = 'no-cache'
    logger.info('Fetching {url} ({cache})'.format(url=url, cache='no cache' if force else 'cache ok'))
    try:
        p = perf.start()
        if session is not None:
            response = session.get(url, headers=headers)
        else:
            response = requests.get(url, headers=headers)
        perf.check(p, 'slow_fetch', (url, headers), 'fetch')
        if character_encoding is not None:
            response.encoding = character_encoding
        if response.status_code in [500, 502, 503]:
            raise FetchException(f'Server returned a {response.status_code} from {url}')
        p = perf.start()
        t = response.text
        took = round(perf.took(p), 2)
        if took > 1:
            logger.warning('Getting text from response was very slow. Setting an explicit character_encoding may help.')
        return t
    except (urllib.error.HTTPError, requests.exceptions.ConnectionError, TimeoutError) as e:
        if retry:
            return METHOD_NAME(url, character_encoding, force, retry=False)
        raise FetchException(e) from e