code: def select_leaves(self, name):
          
  
          if self.is_leaf:
              return [self] if re.search(name, self.label) else []
          else:
              leaves = []
              if re.search(name, self.label):
                  for c in self.children:
                      leaves += c._get_leaves() #all leaves
              else:
                  for c in self.children:
                      leaves += c.select_leaves(name) #only matching ones
              return leaves
docs: Returns all leaves under all nodes matching name