<commit_before>"""
Implementation of hooks and APIs for outputting log messages.
"""

import sys
import traceback
import inspect
import json as pyjson
from threading import Lock
from functools import wraps
from io import IOBase
from uuid import uuid4

from pyrsistent import PClass, field

from . import _bytesjson as bytesjson
from zope.interface import Interface, implementer

from ._traceback import write_traceback, TRACEBACK_MESSAGE
from ._message import EXCEPTION_FIELD, MESSAGE_TYPE_FIELD, REASON_FIELD
from ._util import saferepr, safeunicode
from .json import EliotJSONEncoder
from ._validation import ValidationError
<commit_msg>Remove unused imports.<commit_after>"""
Implementation of hooks and APIs for outputting log messages.
"""

import traceback
import inspect
import json as pyjson
from threading import Lock
from functools import wraps
from io import IOBase

from pyrsistent import PClass, field

from . import _bytesjson as bytesjson
from zope.interface import Interface, implementer

from ._traceback import write_traceback, TRACEBACK_MESSAGE
from ._message import EXCEPTION_FIELD, MESSAGE_TYPE_FIELD, REASON_FIELD
from ._util import saferepr, safeunicode
from .json import EliotJSONEncoder
from ._validation import ValidationError

{'fraction_non_alphanumeric': 0.03750997605746209, 'fraction_numerical': 0.0007980845969672786, 'mean_word_length': 6.125, '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': '6911786', 'n_tokens_mistral': 350, 'n_tokens_neox': 337, 'n_words': 146}