class_docstr: This is a perf optimization to limit the number of objects we need to visit in tx.replace_all.
  This must be a seperate object so that it is not cloned in apply.
class_docstr_tok: ["This","is","a","perf","optimization","to","limit","the","number","of","objects","we","need","to","visit","in","tx.replace_all",".","This","must","be","a","seperate","object","so","that","it","is","not","cloned","in","apply","."]
code: def recursive_parents(self):
      rv = dict(self.parents)
      worklist = list(self.parents)
      while worklist:
          for parent in worklist.pop().parents:
              if parent not in rv:
                  assert isinstance(parent, ParentsTracker)
                  rv[parent] = True
                  worklist.append(parent)
      return rv.keys()
  
imports: import collections
  from enum import Enum
  from typing import Any, Callable, Dict, List
  from ..None import variables
  from ..current_scope_id import current_scope_id
  from ..exc import unimplemented
  from ..source import AttrSource, Source
  from ..utils import identity, istype
label_desc: Use image node_id 3 for calling the ParentsTracker obj's underlying member method code with example usage: obj.recursive_parents() and returns: rv