Manual assignment of a (stopped) times object as a subdivision of running
    timer.  Use cases are expected to be very limited (mainly provided as a
    one-Times variant of attach_par_subdivision).

    Notes:
        As with any subdivision, the interval in the receiving timer is assumed to
        totally subsume the time accumulated within the attached object--the total
        in the receiver is not adjusted!

    Args:
        times (Times): Individual Times data object.

    Raises:
        TypeError: If times not a Times data object.

def attach_subdivision(times):
    """
    Manual assignment of a (stopped) times object as a subdivision of running
    timer.  Use cases are expected to be very limited (mainly provided as a
    one-Times variant of attach_par_subdivision).

    Notes:
        As with any subdivision, the interval in the receiving timer is assumed to
        totally subsume the time accumulated within the attached object--the total
        in the receiver is not adjusted!

    Args:
        times (Times): Individual Times data object.

    Raises:
        TypeError: If times not a Times data object.
    """
    t = timer()
    if not isinstance(times, Times):
        raise TypeError("Expected Times object for param 'times'.")
    assert times.total > 0., "Attached subdivision has total time 0, appears empty."
    name = times.name
    f.r.self_agg += times.self_agg
    if name not in f.t.subdvsn_awaiting:
        times_copy = copy.deepcopy(times)
        times_copy.parent = f.r
        f.t.subdvsn_awaiting[name] = times_copy
    else:
        merge.merge_times(f.t.subdvsn_awaiting[name], times)
    f.t.self_cut += timer() - t