docstr: 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.
docstr_tok: ["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","."]
code: 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)
  
imports: from typing import Tuple, Union, List, Dict, Callable, Iterable, Optional
  from spacy.language import Language
  from spacy.tokens import Doc, Token, Span
  from spacy.training import Example
  from spacy.vocab import Vocab
  from spacy.util import SimpleFrozenDict
  from pathlib import Path
  import numpy
  from .sense2vec import Sense2Vec
  from .util import registry
label_desc: Use image node_id 9 for calling the Sense2VecComponent obj's underlying member method code with example usage: obj.s2v_key(obj) and returns: obj, lemma_key