code: def morph(doclike: types.DocLike) -> dict[str, dict[str, int]]:
      """
      Count the number of times each value for a morphological feature appears
      as a token annotation in ``doclike``.
  
      Args:
          doclike
  
      Returns:
          Mapping of morphological feature to value counts of occurrence.
  
      See Also:
          :class:`spacy.tokens.MorphAnalysis`
      """
      morph_counts: collections.abc.Mapping = collections.defaultdict(
          collections.Counter
      )
      for tok in doclike:
          for label, val in tok.morph.to_dict().items():
              morph_counts[label][val] += 1
      return {
          label: dict(val_counts)
          for label, val_counts in morph_counts.items()
      }
  
imports: import collections
  import collections.abc
  from ..None import types
label_desc: Use image node_id 1 for calling a global function with example usage: morph(doclike) and returns: unknown