code: def _get_deprecated_option(key: str):
      """
      Retrieves the metadata for a deprecated option, if `key` is deprecated.
  
      Returns
      -------
      DeprecatedOption (namedtuple) if key is deprecated, None otherwise
      """
      try:
          d = _deprecated_options[key]
      except KeyError:
          return None
      else:
          return d
  
imports: from __future__ import annotations
  from contextlib import ContextDecorator, contextmanager
  import re
  from typing import Any, Callable, Generator, Generic, Iterable, NamedTuple, cast
  import warnings
  from pandas._typing import F, T
  from pandas.util._exceptions import find_stack_level
label_desc: Use image node_id 12 for calling a global function with example usage: _get_deprecated_option(key) and returns: d, None