<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stats_on_depth(d, depth):
 """Display the node stats info on specific depth in this dict """

        root_nodes, leaf_nodes = 0, 0
        for _, node in DictTree.kv_depth(d, depth):
            if DictTree.length(node) == 0:
                leaf_nodes += 1
            else:
                root_nodes += 1
        total = root_nodes + leaf_nodes
        print("On depth %s, having %s root nodes, %s leaf nodes. "
              "%s nodes in total." % (depth, root_nodes, leaf_nodes, total))