<commit_before>"""Utilities for pickling"""


def pickle_instance_method(method):
    """Pickle class instance method."""
    func_name = method.im_func.__name__
    obj = method.im_self
    cls = method.im_class
    return unpickle_instance_method, (func_name, obj, cls)<commit_msg>[BUG] Fix python 3 compatability.<commit_after>"""Utilities for pickling"""


def pickle_instance_method(method):
    """Pickle class instance method."""
    func_name = method.__func__.__name__
    obj = method.__self__
    cls = method.__self__.__class__
    return unpickle_instance_method, (func_name, obj, cls)
{'fraction_non_alphanumeric': 0.11036789297658862, 'fraction_numerical': 0.0016722408026755853, 'mean_word_length': 4.704761904761905, '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': '5878347', 'n_tokens_mistral': 187, 'n_tokens_neox': 183, 'n_words': 43}