code: def _check_deprecated(self, dest, kwargs):
      
      removal_version = kwargs.get('removal_version', None)
      if removal_version is not None:
        warn_or_error(
          removal_version=removal_version,
          deprecated_entity_description="option '{}' in {}".format(dest, self._scope_str()),
          deprecation_start_version=kwargs.get('deprecation_start_version', None),
          hint=kwargs.get('removal_hint', None),
          stacklevel=9999)
docs: Checks option for deprecation and issues a warning/error if necessary.