<commit_before># -*- coding: utf-8 -*-

# Import python libs
from __future__ import absolute_import
import os
import ast
import copy
import tempfile
import json
import datetime
import pprint
import re

# Import Salt Testing libs
from tests.support.unit import skipIf, TestCase
from tests.support.case import ModuleCase
from tests.support.mock import NO_MOCK, NO_MOCK_REASON, patch, MagicMock
from tests.support.paths import TMP_CONF_DIR

# Import salt libs
import salt.config
from salt.ext import six
import salt.loader
import salt.utils.files
from salt.utils import get_context
from salt.exceptions import SaltRenderError
from salt.ext.six.moves import builtins
from salt.utils.decorators.jinja import JinjaFilter
from salt.utils.jinja import (
    SaltCacheLoader,
    SerializerExtension,
    ensure_sequence_filter
)
from salt.utils.templates import JINJA, render_jinja_tmpl
from salt.utils.odict import OrderedDict
import salt.utils.stringutils

# Import 3rd party libs
import yaml
from jinja2 import Environment, DictLoader, exceptions
try:
    import timelib  # pylint: disable=W0611
    HAS_TIMELIB = True
except ImportError:
    HAS_TIMELIB = False<commit_msg>Reorder and group imports in jina template unit tests<commit_after># -*- coding: utf-8 -*-

# Import python libs
from __future__ import absolute_import
from jinja2 import Environment, DictLoader, exceptions
import ast
import copy
import datetime
import json
import os
import pprint
import re
import tempfile
import yaml

# Import Salt Testing libs
from tests.support.unit import skipIf, TestCase
from tests.support.case import ModuleCase
from tests.support.mock import NO_MOCK, NO_MOCK_REASON, patch, MagicMock
from tests.support.paths import TMP_CONF_DIR

# Import Salt libs
import salt.config
import salt.loader
from salt.exceptions import SaltRenderError

from salt.ext import six
from salt.ext.six.moves import builtins

from salt.utils.decorators.jinja import JinjaFilter
from salt.utils.jinja import (
    SaltCacheLoader,
    SerializerExtension,
    ensure_sequence_filter
)
from salt.utils.odict import OrderedDict
from salt.utils.templates import (
    get_context,
    JINJA,
    render_jinja_tmpl
)
import salt.utils.files
import salt.utils.stringutils

# Import 3rd party libs
try:
    import timelib  # pylint: disable=W0611
    HAS_TIMELIB = True
except ImportError:
    HAS_TIMELIB = False
{'fraction_non_alphanumeric': 0.05391743892165122, 'fraction_numerical': 0.005897219882055603, 'mean_word_length': 4.864197530864198, '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': '5376831', 'n_tokens_mistral': 727, 'n_tokens_neox': 702, 'n_words': 242}