# Path: gtimer/private/focus.py
# def create_next_timer(*args, **kwargs):
# def remove_last_timer():
# def create_next_loop(*args, **kwargs):
# def remove_last_loop():
# def refresh_shortcuts():
# def hard_reset():
# def get_current_timer():
# 
# Path: gtimer/local/merge.py
# def merge_times(rcvr, new):
# def _merge_stamps(rcvr, new):
# def _merge_dict(rcvr, new, attr):
# def _merge_dict_itr(rcvr, new, attr, itr_func):
# def _stamps_as_itr(rcvr, new):
# def _merge_subdivisions(rcvr, new):
# def _merge_par_subdivisions(rcvr, new):
# 
# Path: gtimer/util.py
# def iteritems(dictionary):
#     return dictionary.items()
# 
# def itervalues(dictionary):
#     return dictionary.values()


from timeit import default_timer as timer
from gtimer.private import focus as f
from gtimer.local import merge
from gtimer.util import iteritems, itervalues
def _assign_subdvsn(position):
    new_pos = position not in f.r.subdvsn and f.t.subdvsn_awaiting
    if new_pos:
        f.r.subdvsn[position] = list()
        for sub_times in itervalues(f.t.subdvsn_awaiting):
            sub_times.pos_in_parent = position
            f.r.subdvsn[position] += [sub_times]
    else:
        for sub_times in itervalues(f.t.subdvsn_awaiting):
            is_prev_sub = False
            for old_sub in f.r.subdvsn[position]:
                if old_sub.name == sub_times.name:
                    is_prev_sub = True
                    break
            if is_prev_sub:
                merge.merge_times(old_sub, sub_times)
            else:
                sub_times.pos_in_parent = position
                f.r.subdvsn[position].append(sub_times)


def _assign_par_subdvsn(position):
    new_pos = position not in f.r.par_subdvsn and f.t.par_subdvsn_awaiting
    if new_pos:
        f.r.par_subdvsn[position] = dict()
        for par_name, sub_list in iteritems(f.t.par_subdvsn_awaiting):
            for sub_times in sub_list:
                sub_times.pos_in_parent = position
            f.r.par_subdvsn[position][par_name] = sub_list
    else:

# Path: gtimer/private/focus.py
# def create_next_timer(*args, **kwargs):
# def remove_last_timer():
# def create_next_loop(*args, **kwargs):
# def remove_last_loop():
# def refresh_shortcuts():
# def hard_reset():
# def get_current_timer():
# 
# Path: gtimer/local/merge.py
# def merge_times(rcvr, new):
# def _merge_stamps(rcvr, new):
# def _merge_dict(rcvr, new, attr):
# def _merge_dict_itr(rcvr, new, attr, itr_func):
# def _stamps_as_itr(rcvr, new):
# def _merge_subdivisions(rcvr, new):
# def _merge_par_subdivisions(rcvr, new):
# 
# Path: gtimer/util.py
# def iteritems(dictionary):
#     return dictionary.items()
# 
# def itervalues(dictionary):
#     return dictionary.values()


# Path: gtimer/private/times.py
from timeit import default_timer as timer
from gtimer.private import focus as f
from gtimer.local import merge
from gtimer.util import iteritems, itervalues

def _assign_subdvsn(position):
    new_pos = position not in f.r.subdvsn and f.t.subdvsn_awaiting
    if new_pos:
        f.r.subdvsn[position] = list()
        for sub_times in itervalues(f.t.subdvsn_awaiting):
            sub_times.pos_in_parent = position
            f.r.subdvsn[position] += [sub_times]
    else:
        for sub_times in itervalues(f.t.subdvsn_awaiting):
            is_prev_sub = False
            for old_sub in f.r.subdvsn[position]:
                if old_sub.name == sub_times.name:
                    is_prev_sub = True
                    break
            if is_prev_sub:
                merge.merge_times(old_sub, sub_times)
            else:
                sub_times.pos_in_parent = position
                f.r.subdvsn[position].append(sub_times)


def _assign_par_subdvsn(position):
    new_pos = position not in f.r.par_subdvsn and f.t.par_subdvsn_awaiting
    if new_pos:
        f.r.par_subdvsn[position] = dict()
        for par_name, sub_list in iteritems(f.t.par_subdvsn_awaiting):
            for sub_times in sub_list:
                sub_times.pos_in_parent = position
            f.r.par_subdvsn[position][par_name] = sub_list
    else:

        for par_name, sub_list in iteritems(f.t.par_subdvsn_awaiting):