code: def lookup_key(self):
          
          parts = set()
          for node in self.simple_selectors:
              for token in node.tokens:
                  if token[0] not in ':[':
                      parts.add(token)
  
          if not parts:
              # Should always have at least ONE key; selectors with no elements,
              # no classes, and no ids can be indexed as None to avoid a scan of
              # every selector in the entire document
              parts.add(None)
  
          return frozenset(parts)
docs: Build a key from the "important" parts of a selector: elements,
          classes, ids.