docs: def leaf_sections(h):
      """
      Returns a list of all sections that have no children.
      """
      leaves = []
      for section in h.allsec():
          sref = h.SectionRef(sec=section)
          # nchild returns a float... cast to bool
          if sref.nchild() < 0.9:
              leaves.append(section)
      return leaves