code: def get_true_cased_text(
      obj: Union[Token, Span], lemmatize: bool = False
  ):
      """Correct casing so that sentence-initial words are not title-cased. Named
      entities and other special cases (such as the word "I") should still be
      title-cased.
  
      obj (Token / Span): The spaCy object to conver to text.
      lemmatize (bool): Use the object's lemma instead of its text.
      RETURNS (unicode): The converted text.
      """
      if lemmatize:
          return obj.lemma_
      if isinstance(obj, Token) and (
          not obj.is_sent_start or obj.ent_type_
      ):
          return obj.text
      elif isinstance(obj, Span) and (
          not obj[0].is_sent_start or obj[0].ent_type
      ):
          return obj.text
      elif (  # Okay, we have a non-entity, starting a sentence
          not obj.text[0].isupper()  # Is its first letter upper-case?
          or any(
              c.isupper() for c in obj.text[1:]
          )  # ..Only its first letter?
          or obj.text[0] == "I"  # Is it "I"?
      ):
          return obj.text
      else:  # Fix the casing
          return obj.text.lower()
  
file_path: sense2vec/sense2vec/util.py
imports: from typing import Union, List, Tuple, Set
  import re
  from spacy.tokens import Doc, Token, Span
  from spacy.util import filter_spans
  from thinc.api import get_array_module
  import catalogue
label_desc: Use image node_id 4 for calling a global function with example usage: get_true_cased_text(obj, lemmatize) and returns: obj, obj, obj, obj, obj