<commit_before>"""
Helper functions and data structures
"""
import functools
import re
import typing
from contextlib import contextmanager
from importlib import import_module

if typing.TYPE_CHECKING:
    from typing import Generator, List, Match, Optional, Pattern, Union

    from .block import BlockElement


def camel_to_snake_case(name):  # type: (str) -> str
    """Takes a camelCased string and converts to snake_case."""
    pattern = r"[A-Z][a-z]+|[A-Z]+(?![a-z])"
    return "_".join(map(str.lower, re.findall(pattern, name)))

<commit_msg>use bare type_checking<commit_after>"""
Helper functions and data structures
"""
import functools
import re
from contextlib import contextmanager
from importlib import import_module
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from typing import Generator, List, Match, Optional, Pattern, Union

    from .block import BlockElement


def camel_to_snake_case(name):  # type: (str) -> str
    """Takes a camelCased string and converts to snake_case."""
    pattern = r"[A-Z][a-z]+|[A-Z]+(?![a-z])"
    return "_".join(map(str.lower, re.findall(pattern, name)))


{'fraction_non_alphanumeric': 0.12042818911685994, 'fraction_numerical': 0.0, 'mean_word_length': 4.783505154639175, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4963156', 'n_tokens_mistral': 361, 'n_tokens_neox': 346, 'n_words': 112}