code: def getAncestors(self, all_ancestors=True):
          
          parent = self.getParentAnalysisRequest()
          if not parent:
              return list()
          if not all_ancestors:
              return [parent]
          return [parent] + parent.getAncestors(all_ancestors=True)
docs: Returns the ancestor(s) of this Analysis Request
          param all_ancestors: include all ancestors, not only the parent