code: def get_spacy_lang_morph_labels(lang: types.LangLike) -> set[str]:
      """
      Get the full set of morphological feature labels assigned
      by a spaCy language pipeline according to its "morphologizer" pipe's metadata,
      or just get the default set of Universal Dependencies (v2) feature labels.
  
      Args:
          lang: Language with which spaCy processes text, represented as the full name
              of a spaCy language pipeline, the path on disk to it,
              or an already instantiated pipeline.
  
      Returns:
          Set of morphological feature labels assigned/assignable by ``lang``.
      """
      spacy_lang = resolve_langlike(lang)
      if spacy_lang.has_pipe("morphologizer"):
          morphologizer = spacy_lang.get_pipe("morphologizer")
      elif any(
          isinstance(comp, Morphologizer)
          for _, comp in spacy_lang.pipeline
      ):
          for _, component in spacy_lang.pipeline:
              if isinstance(component, Morphologizer):
                  morphologizer = component
                  break
          else:
              return (
                  constants.UD_V2_MORPH_LABELS
              )  # mypy not smart enough to know better
      else:
          return constants.UD_V2_MORPH_LABELS
  
      assert isinstance(morphologizer, Morphologizer)  # type guard
      return {
          feat_name
          for label in morphologizer.labels
          for feat_name in Morphology.feats_to_dict(label).keys()
      }
  
imports: from __future__ import annotations
  import functools
  import itertools
  import pathlib
  from typing import Iterable, Union
  from cachetools import cached
  from cachetools.keys import hashkey
  from spacy import attrs
  from spacy.language import Language
  from spacy.morphology import Morphology
  from spacy.pipeline import Morphologizer
  from spacy.symbols import PROPN, VERB
  from spacy.tokens import Doc, Span, Token
  from ..None import cache, constants, errors, types, utils
  from .None import core
label_desc: Use image node_id 13 for calling a global function with example usage: get_spacy_lang_morph_labels(lang) and returns: unknown, constants, constants