<commit_before>import sys
import copy
import datetime
import collections

PYTHON_MAJOR_VERSION = int(sys.version_info[0])


def update_dict(d, u):
    """update dict-instance recursive.
    """
    if PYTHON_MAJOR_VERSION == 3:
        it_ = u.items
    else:
        it_ = u.iteritems
    d_ = copy.deepcopy(d)
    for k, v in it_():
        if isinstance(v, collections.Mapping):
            r = update_dict(d_.get(k, {}), v)
            d_[k] = r
        else:
            d_[k] = u[k]
    return d_

<commit_msg>resolve failed import<commit_after>import sys
import copy
import datetime
import collections
import pytz

PYTHON_MAJOR_VERSION = int(sys.version_info[0])


def update_dict(d, u):
    """update dict-instance recursive.
    """
    if PYTHON_MAJOR_VERSION == 3:
        it_ = u.items
    else:
        it_ = u.iteritems
    d_ = copy.deepcopy(d)
    for k, v in it_():
        if isinstance(v, collections.Mapping):
            r = update_dict(d_.get(k, {}), v)
            d_[k] = r
        else:
            d_[k] = u[k]
    return d_


{'fraction_non_alphanumeric': 0.11596958174904944, 'fraction_numerical': 0.0038022813688212928, 'mean_word_length': 2.2006079027355625, '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': '4582170', 'n_tokens_mistral': 378, 'n_tokens_neox': 370, 'n_words': 92}