code: def prefixes(self):
          
          pset = set()
          for n in self.nodes():
              pfx = self.prefix(n)
              if pfx is not None:
                  pset.add(pfx)
          return list(pset)
docs: list all prefixes used