code: def deprecated(help_message: Optional[str] = None):
      """
      标记当前功能已经过时的装饰器。
  
      :param help_message: 一段指引信息，告知用户如何将代码切换为当前版本提倡的用法；
      """
  
      def decorator(deprecated_function: Callable):
          global _emitted_deprecation_warnings
          warning_msg = (
              (
                  f"{deprecated_function.__name__} is deprecated and will be removed "
                  "in the next major version of datasets."
              )
              + f" {help_message}"
              if help_message
              else ""
          )
  
          @wraps(deprecated_function)
          def wrapper(*args, **kwargs):
              func_hash = hash(deprecated_function)
              if func_hash not in _emitted_deprecation_warnings:
                  logger.warning(
                      warning_msg, category=FutureWarning, stacklevel=2
                  )
                  _emitted_deprecation_warnings.add(func_hash)
              return deprecated_function(*args, **kwargs)
  
          wrapper._decorator_name_ = "deprecated"
          return wrapper
  
      return decorator
  
imports: import functools
  import inspect
  from inspect import Parameter
  import dataclasses
  from dataclasses import is_dataclass
  from copy import deepcopy
  from collections import defaultdict, OrderedDict
  from typing import Callable, List, Any, Dict, AnyStr, Union, Mapping, Sequence
  from typing import Tuple, Optional
  from time import sleep
  import os
  from contextlib import contextmanager
  from functools import wraps
  from prettytable import PrettyTable
  from pathlib import Path
  from fastNLP.core.log import logger
label_desc: Use image node_id 16 for calling a global function with example usage: deprecated(help_message) and returns: decorator, wrapper, deprecated_function