def METHOD_NAME(self, request):
    """
    Remove any language that is not either in ``self.released_langs`` or ``self.beta_langs`` (if enabled) or
    a territory of one of those languages.
    """
    accept = request.META.get('HTTP_ACCEPT_LANGUAGE', None)
    if accept is None or accept == '*':
        return
    new_accept = []
    for lang, priority in _dark_parse_accept_lang_header(accept):
        fuzzy_code = self._fuzzy_match(lang.lower())
        if fuzzy_code:
            # Formats lang and priority into a valid accept header fragment.
            new_accept.append(f"{fuzzy_code};q={priority}")
    new_accept = ", ".join(new_accept)
    request.META['HTTP_ACCEPT_LANGUAGE'] = new_accept