docs: def _prune_some_if_small(self, small_size, a_or_u):
          "Merge some nodes in the directory, whilst keeping others."
          # Assert that we're not messing things up.
          prev_app_size = self.app_size()
          prev_use_size = self.use_size()
  
          keep_nodes = []
          prune_app_size = 0
          prune_use_size = 0
          for node in self._nodes:
              node_size = node.app_size() if a_or_u else node.use_size()
              if node_size < small_size:
                  if a_or_u:
                      prune_app_size += node_size
                      prune_use_size += node.use_size()
                  else:
                      prune_app_size += node.app_size()
                      prune_use_size += node_size
              else:
                  keep_nodes.append(node)
  
          # Last "leftover" node? Merge with parent.
          if len(keep_nodes) == 1 and keep_nodes[-1]._isdir is None:
              prune_app_size += keep_nodes[-1]._app_size
              prune_use_size += keep_nodes[-1]._use_size
              keep_nodes = []
  
          if prune_app_size:
              if not keep_nodes:
                  # The only node to keep, no "leftovers" here. Move data
                  # to the parent.
                  keep_nodes = None
                  assert self._isdir and self._nodes is not None
                  self._set_size(prune_app_size, prune_use_size)
              elif keep_nodes and keep_nodes[-1]._isdir is None:
                  # There was already a leftover node. Add the new leftovers.
                  keep_nodes[-1]._add_size(prune_app_size, prune_use_size)
              else:
                  # Create a new leftover node.
                  keep_nodes.append(DuNode.new_leftovers(
                      self._path, prune_app_size, prune_use_size))
  
          # Update nodes and do the actual assertion.
          self._nodes = keep_nodes
          assert prev_app_size == self.app_size(), (
              prev_app_size, self.app_size())
          assert prev_use_size == self.use_size(), (
              prev_use_size, self.use_size())