<commit_before>import sys
import functools

from rlp.utils import (
    int_to_big_endian,
    big_endian_to_int,
    encode_hex,
    decode_hex as _decode_hex,
)
from ethereum.utils import (
    is_numeric,
    normalize_address as _normalize_address,
    zpad,
)


if sys.version_info.major == 2:
    binary_types = (bytes, bytearray)
    text_types = (unicode,)
    string_types = (basestring, bytearray)
else:
    binary_types = (bytes, bytearray)
    text_types = (str,)
    string_types = (bytes, str, bytearray)


def is_binary(value):
    return isinstance(value, binary_types)


def is_text(value):
    return isinstance(value, text_types)


def is_string(value):
    return isinstance(value, string_types)


if sys.version_info.major == 2:
    def force_bytes(value):
        if is_binary(value):
            return str(value)
        elif is_text(value):
            return value.encode('latin1')
        else:
            raise TypeError("Unsupported type: {0}".format(type(value)))

    def force_text(value):
        if is_text(value):
            return value
        elif is_binary(value):
            return unicode(force_bytes(value), 'latin1')
        else:
            raise TypeError("Unsupported type: {0}".format(type(value)))
else:
    def force_bytes(value):
        if is_binary(value):
            return bytes(value)
        elif is_text(value):<commit_msg>flake8<commit_after>import sys
import functools

from rlp.utils import (
    int_to_big_endian,
    big_endian_to_int,
    encode_hex,
    decode_hex as _decode_hex,
)
from ethereum.utils import (
    is_numeric,
    normalize_address as _normalize_address,
    zpad,
)


if sys.version_info.major == 2:
    binary_types = (bytes, bytearray)
    text_types = (unicode,)  # NOQA
    string_types = (basestring, bytearray)  # NOQA
else:
    binary_types = (bytes, bytearray)
    text_types = (str,)
    string_types = (bytes, str, bytearray)


def is_binary(value):
    return isinstance(value, binary_types)


def is_text(value):
    return isinstance(value, text_types)


def is_string(value):
    return isinstance(value, string_types)


if sys.version_info.major == 2:
    def force_bytes(value):
        if is_binary(value):
            return str(value)
        elif is_text(value):
            return value.encode('latin1')
        else:
            raise TypeError("Unsupported type: {0}".format(type(value)))

    def force_text(value):
        if is_text(value):
            return value
        elif is_binary(value):
            return unicode(force_bytes(value), 'latin1')  # NOQA
        else:
            raise TypeError("Unsupported type: {0}".format(type(value)))
else:
    def force_bytes(value):
        if is_binary(value):
            return bytes(value)
        elif is_text(value):
{'fraction_non_alphanumeric': 0.10154287764621457, 'fraction_numerical': 0.0046645138141370645, 'mean_word_length': 2.8614958448753463, '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': '7456090', 'n_tokens_mistral': 914, 'n_tokens_neox': 890, 'n_words': 202}