code: def ancestors(self):
      
      ret = []
      workunit = self
      while workunit is not None:
        ret.append(workunit)
        workunit = workunit.parent
      return ret
docs: Returns a list consisting of this workunit and those enclosing it, up to the root.
  
      :API: public