code: def _wrap_cal_value(func):
      @functools.wraps(func)
      def _wrap_cal(*args, **kwargs):
          self = args[0]
          value = func(*args, **kwargs)
          value = self.backend.get_scalar(value)
          return value
  
      return _wrap_cal
  
imports: import os
  import functools
  from .backend import Backend, AutoBackend
  from fastNLP.core.log import logger
  from .utils import AggregateMethodError
  from fastNLP.envs.env import FASTNLP_GLOBAL_RANK
label_desc: Use image node_id 1 for calling a global function with example usage: _wrap_cal_value(func) and returns: _wrap_cal, value