<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tcsort(item):
 # FIXME SUCH WOW SO INEFFICIENT O_O

    return len(item[1]) + sum(tcsort(kv) for kv in item[1].items())