<commit_before>from django.conf import settings

from corehq.toggles import NAMESPACE_DOMAIN, NEW_EXPORTS, TF_USES_SQLITE_BACKEND
from dimagi.utils.logging import notify_exception

import threading

_thread_local = threading.local()


def get_local_domain_sql_backend_override(domain):
    try:
        return _thread_local.use_sql_backend[domain]
    except (AttributeError, KeyError):
        return None


def set_local_domain_sql_backend_override(domain):
    use_sql_backend_dict = getattr(_thread_local, 'use_sql_backend', {})
    use_sql_backend_dict[domain] = True<commit_msg>[ci skip] cleaup imports<commit_after>import threading

from django.conf import settings

from corehq.toggles import NEW_EXPORTS, TF_USES_SQLITE_BACKEND

_thread_local = threading.local()


def get_local_domain_sql_backend_override(domain):
    try:
        return _thread_local.use_sql_backend[domain]
    except (AttributeError, KeyError):
        return None


def set_local_domain_sql_backend_override(domain):
    use_sql_backend_dict = getattr(_thread_local, 'use_sql_backend', {})
    use_sql_backend_dict[domain] = True
{'fraction_non_alphanumeric': 0.06930693069306931, 'fraction_numerical': 0.0, 'mean_word_length': 5.822085889570552, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5309838', 'n_tokens_mistral': 361, 'n_tokens_neox': 358, 'n_words': 67}