code: def get_doc_meta(doc: Doc) -> dict:
      """
      Get custom metadata added to ``doc`` .
      Typically used as a custom extension, like ``doc._.meta`` .
      """
      return doc.user_data.get("textacy", {}).get("meta", {})
  
imports: from __future__ import annotations
  import functools
  import logging
  import pathlib
  from typing import Optional
  import spacy
  from cachetools import cached
  from cachetools.keys import hashkey
  from spacy.language import Language
  from spacy.tokens import Doc
  from ..None import cache, errors, types, utils
  from .None import extensions
  from .None import utils
label_desc: Use image node_id 8 for calling a global function with example usage: get_doc_meta(doc) and returns: doc