<commit_before>try:
    from collections import UserDict
except ImportError:
    from UserDict import UserDict

from django.utils.encoding import StrAndUnicode
from django.template.loader import render_to_string
from django.db.models.fields import FieldDoesNotExist

# Sane boundary constants
MINIMUM_PAGE_LENGTH = 5

DEFAULT_OPTIONS = {
    'columns': [],  # table headers
    'ordering': [],  # override to Model._meta.ordering
    # 'filters': {},  # field_name__lookuptype: value
    'start_offset': 0,  # results to skip ahead
    'page_length': 25,  # length of a single result page
    'search': None,  # client search string
    'search_fields': [],  # extra ORM paths to search; not displayed
    'unsortable_columns': [],  # table headers not allowed to be sorted
    'hidden_columns': [],  # table headers to be generated, but hidden by the client
    'structure_template': "datatableview/default_structure.html",
    'result_counter_id': 'id_count',  # HTML element ID to display the total results

    # TODO: Support additional field options:
    # 'exclude': [],
}
<commit_msg>Reorder imports<commit_after>try:
    from collections import UserDict
except ImportError:
    from UserDict import UserDict

from django.db.models.fields import FieldDoesNotExist
from django.template.loader import render_to_string
from django.utils.encoding import StrAndUnicode

# Sane boundary constants
MINIMUM_PAGE_LENGTH = 5

DEFAULT_OPTIONS = {
    'columns': [],  # table headers
    'ordering': [],  # override to Model._meta.ordering
    # 'filters': {},  # field_name__lookuptype: value
    'start_offset': 0,  # results to skip ahead
    'page_length': 25,  # length of a single result page
    'search': None,  # client search string
    'search_fields': [],  # extra ORM paths to search; not displayed
    'unsortable_columns': [],  # table headers not allowed to be sorted
    'hidden_columns': [],  # table headers to be generated, but hidden by the client
    'structure_template': "datatableview/default_structure.html",
    'result_counter_id': 'id_count',  # HTML element ID to display the total results

    # TODO: Support additional field options:
    # 'exclude': [],
}

{'fraction_non_alphanumeric': 0.09606587374199452, 'fraction_numerical': 0.0036596523330283625, 'mean_word_length': 4.109813084112149, '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': '6777144', 'n_tokens_mistral': 625, 'n_tokens_neox': 616, 'n_words': 207}