def s2v_key(self, obj: Union[Token, Span]) -> str:
        """Extension attribute getter and helper method. Create a Sense2Vec key
        like "duck|NOUN" from a spaCy object.

        obj (Token / Span): The object to create the key for.
        RETURNS (unicode): The key.
        """
        make_space_key_id = obj.doc._._s2v.cfg.get("make_spacy_key", "default")
        make_spacy_key = registry.make_spacy_key.get(make_space_key_id)
        if obj.doc._._s2v.cfg.get("lemmatize", False):
            lemma = make_spacy_key(obj, prefer_ents=self.merge_phrases, lemmatize=True)
            lemma_key = obj.doc._._s2v.make_key(*lemma)
            if lemma_key in obj.doc._._s2v:
                return lemma_key
        word, sense = make_spacy_key(obj, prefer_ents=self.merge_phrases)
        return obj.doc._._s2v.make_key(word, sense)
Extension attribute getter and helper method. Create a Sense2Vec key
        like "duck|NOUN" from a spaCy object.

        obj (Token / Span): The object to create the key for.
        RETURNS (unicode): The key.
        
sense2vec/component.py