code: def _check_build_status(func):
      r"""
      A decorator to check whether the vocabulary updates after the last build.
  
      :param func: 用户传入要修饰的callable函数
  
      """
  
      @wraps(func)  # to solve missing docstring
      def _wrapper(self, *args, **kwargs):
          if self.rebuild is False:
              self.rebuild = True
              if (
                  self.max_size is not None
                  and len(self.word_count) >= self.max_size
              ):
                  logger.warning(
                      "Vocabulary has reached the max size {} when calling {} method. "
                      "Adding more words may cause unexpected behaviour of Vocabulary. ".format(
                          self.max_size, func.__name__
                      )
                  )
          return func(self, *args, **kwargs)
  
      return _wrapper
  
imports: from collections import Counter
  from functools import partial
  from functools import wraps
  from typing import List, Callable, Union
  from fastNLP.core.dataset import DataSet
  from fastNLP.core.utils.utils import Option
  from fastNLP.core.utils.utils import _is_iterable
  from .log import logger
  import io
label_desc: Use image node_id 2 for calling a global function with example usage: _check_build_status(func) and returns: _wrapper, func