<commit_before>from django.conf import settings
from django.utils.module_loading import import_string
from corehq.apps.userreports.expressions.factory import ExpressionFactory


def get_custom_ucr_expressions():
    custom_ucr_expressions = settings.CUSTOM_UCR_EXPRESSIONS

    for expression_list in settings.CUSTOM_UCR_EXPRESSION_LISTS:
        custom_ucr_expressions += import_string(expression_list)

    return custom_ucr_expressions

# Bootstrap plugin expressions
for type_name, factory_function_path in get_custom_ucr_expressions():
    ExpressionFactory.register(type_name, import_string(factory_function_path))<commit_msg>append to a copy of list; var-name change<commit_after>import copy

from django.conf import settings
from django.utils.module_loading import import_string
from corehq.apps.userreports.expressions.factory import ExpressionFactory


def get_custom_ucr_expressions():
    custom_ucr_expressions = copy.copy(settings.CUSTOM_UCR_EXPRESSIONS)

    for path_to_expression_lists in settings.CUSTOM_UCR_EXPRESSION_LISTS:
        custom_ucr_expressions += import_string(path_to_expression_lists)

    return custom_ucr_expressions

# Bootstrap plugin expressions
for type_name, factory_function_path in get_custom_ucr_expressions():
    ExpressionFactory.register(type_name, import_string(factory_function_path))
{'fraction_non_alphanumeric': 0.05172413793103448, 'fraction_numerical': 0.0, 'mean_word_length': 7.190184049079755, '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': '7383615', 'n_tokens_mistral': 400, 'n_tokens_neox': 387, 'n_words': 76}