<commit_before># -*- coding: utf-8 -*-
from django.core.exceptions import ImproperlyConfigured


def get_user_connection_model():
    """Return the UserConnection model that is active in this project.

    This is the same pattern user for django's "get_user_model()" method. To
    allow you to set the model instance to a different model subclass.
    """
    from django.conf import settings
    from django.db.models import get_model

    if not hasattr(settings, 'NOTIFICATION_MODEL'):
        from .models import UserConnection
        return UserConnection

    try:
        app_label, model_name = settings.USER_CONNECTION_MODEL.split('.')
    except ValueError:
        raise ImproperlyConfigured("USER_CONNECTION_MODEL must be of the form 'app_label.model_name'")

    user_connection_model = get_model(app_label, model_name)

    if user_connection_model is None:
        raise ImproperlyConfigured("USER_CONNECTION_MODEL refers to model '%s' that has not been installed" % settings.USER_CONNECTION_MODEL)

    return user_connection_model<commit_msg>Pep8 fixes and settings name fix.<commit_after># -*- coding: utf-8 -*-
from django.core.exceptions import ImproperlyConfigured


def get_user_connection_model():
    """Return the UserConnection model that is active in this project.

    This is the same pattern user for django's "get_user_model()" method. To
    allow you to set the model instance to a different model subclass.
    """
    from django.conf import settings
    from django.db.models import get_model

    if not hasattr(settings, 'USER_CONNECTION_MODEL'):
        from .models import UserConnection
        return UserConnection

    try:
        app_label, model_name = settings.USER_CONNECTION_MODEL.split('.')
    except ValueError:
        raise ImproperlyConfigured("USER_CONNECTION_MODEL must be of the form "
                                   "'app_label.model_name'")

    user_connection_model = get_model(app_label, model_name)

    if user_connection_model is None:
        raise ImproperlyConfigured("USER_CONNECTION_MODEL refers to model '%s' "
                                   "that has not been installed" %
                                   settings.USER_CONNECTION_MODEL)

    return user_connection_model
{'fraction_non_alphanumeric': 0.06687333923826395, 'fraction_numerical': 0.001328609388839681, 'mean_word_length': 3.1525735294117645, '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': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1767656', 'n_tokens_mistral': 617, 'n_tokens_neox': 596, 'n_words': 194}