docs: def branch_order(h,section, path=[]):
      """
      Returns the branch order of a section
      """
      path.append(section)
      sref = h.SectionRef(sec=section)
      # has_parent returns a float... cast to bool
      if sref.has_parent() < 0.9:
          return 0 # section is a root
      else:
          nchild = len(list(h.SectionRef(sec=sref.parent).child))
          if nchild <= 1.1:
              return branch_order(h,sref.parent,path)
          else:
              return 1+branch_order(h,sref.parent,path)