docs: def trim(self, length):
          """Cut all branches over a certain length making new leaves at *length*."""
          if length > 0:
              for child in self.children.values(): child.trim(length-1)
          else:
              if hasattr(self, 'count'): self.count = sum(map(lambda x: x.count, self))
              self.children = OrderedDict()