def METHOD_NAME(self, old_key):
    new_key = self.__class__._DEPRECATED_TO_NEW_MEMBERS.get(old_key, old_key)
    is_key_deprecated = old_key != new_key
    if is_key_deprecated:
        msg = "'{old_key}' is deprecated; use '{new_key}' instead.".format(
            old_key=old_key, new_key=new_key
        )
        _warnings.warn(msg, DeprecationWarning)
    return new_key