docs: def prune(self, whole=False, keys=[], names=[], filters=[]):
          """ Filter tree nodes based on given criteria """
          for node in self.climb(whole):
              # Select only nodes with key content
              if not all([key in node.data for key in keys]):
                  continue
              # Select nodes with name matching regular expression
              if names and not any(
                      [re.search(name, node.name) for name in names]):
                  continue
              # Apply advanced filters if given
              try:
                  if not all([utils.filter(filter, node.data, regexp=True)
                          for filter in filters]):
                      continue
              # Handle missing attribute as if filter failed
              except utils.FilterError:
                  continue
              # All criteria met, thus yield the node
              yield node