code: def check_evaluate_every(evaluate_every):
      r"""
      检验用户传入的 ``evaluate_every`` 参数是否合法；
  
      ``evaluate_every`` 的使用详见 ``Trainer`` 的 ``evaluate_every`` 参数；
  
      主要在于当参数 ``evaluate_every`` 是一个 Callable 的函数时，需要保证其参数的正确性；
      """
      if not callable(evaluate_every) and (
          not isinstance(evaluate_every, int) or evaluate_every == 0
      ):
          raise ValueError(
              "Parameter 'evaluate_every' should be set to 'int' type and either < 0 or > 0."
          )
      if callable(evaluate_every):
          _check_valid_parameters_number(
              evaluate_every, expected_params=["trainer"]
          )
  
imports: from typing import Dict
  from fastNLP.core.callbacks import CallbackManager
  from .state import TrainerState
  from fastNLP.core.utils.utils import _check_valid_parameters_number
label_desc: Use image node_id 1 for calling a global function with example usage: check_evaluate_every(evaluate_every) without return types