code: def stats(self, result=None, counter=0):
          
          if result is None:
              result = dict()
  
          if counter == 0:
              if len(self):
                  result[0] = {"depth": 0, "leaf": 0, "root": 1}
              else:
                  result[0] = {"depth": 0, "leaf": 1, "root": 0}
  
          counter += 1
          if len(self):
              result.setdefault(
                  counter, {"depth": counter, "leaf": 0, "root": 0})
              for dict_tree in self.values():
                  if len(dict_tree):  # root
                      result[counter]["root"] += 1
                  else:  # leaf
                      result[counter]["leaf"] += 1
                  dict_tree.stats(result, counter)
  
          return [
              collections.OrderedDict([
                  ("depth", info["depth"]),
                  ("leaf", info["leaf"]),
                  ("root", info["root"]),
              ]) for info in
              sorted(result.values(), key=lambda x: x["depth"])
          ]
docs: Display the node stats info on specific depth in this dict.
  
          ::
  
              [
                  {"depth": 0, "leaf": M0, "root": N0},
                  {"depth": 1, "leaf": M1, "root": N1},
                  ...
                  {"depth": k, "leaf": Mk, "root": Nk},
              ]