code: def _translate_key(key: str) -> str:
      """
      if key id deprecated and a replacement key defined, will return the
      replacement key, otherwise returns `key` as - is
      """
      d = _get_deprecated_option(key)
      if d:
          return d.rkey or key
      else:
          return key
  
imports: from __future__ import annotations
  from contextlib import ContextDecorator, contextmanager
  import re
  from typing import TYPE_CHECKING, Any, Callable, Generic, NamedTuple, cast
  import warnings
  from pandas._typing import F, T
  from pandas.util._exceptions import find_stack_level
label_desc: Use image node_id 14 for calling a global function with example usage: _translate_key(key) and returns: unknown, key