code: def test_basic(self):
      def fn(x):
          return x
  
      x = {"x": 3, "y": 4}
      r = auto_param_call(fn, x)
      assert r == 3
  
      xs = []
      for i in range(10):
          xs.append({f"x{i}": i})
  
      def fn(x0, x1, x2, x3):
          return x0 + x1 + x2 + x3
  
      r = auto_param_call(fn, *xs)
      assert r == 0 + 1 + 2 + 3
  
      def fn(chongfu1, chongfu2, buChongFu):
          pass
  
      with pytest.raises(BaseException) as exc_info:
          auto_param_call(
              fn,
              {"chongfu1": 3, "chongfu2": 4, "buChongFu": 2},
              {"chongfu1": 1, "chongfu2": 2, "buChongFu": 2},
          )
      assert (
          "The following key present in several inputs"
          in exc_info.value.args[0]
      )
      assert (
          "chongfu1" in exc_info.value.args[0]
          and "chongfu2" in exc_info.value.args[0]
      )
  
      # 没用到不报错
      def fn(chongfu1, buChongFu):
          pass
  
      auto_param_call(
          fn,
          {"chongfu1": 1, "chongfu2": 4, "buChongFu": 2},
          {"chongfu1": 1, "chongfu2": 2, "buChongFu": 2},
      )
  
      # 可以定制signature_fn
      def fn1(**kwargs):
          kwargs.pop("x")
          kwargs.pop("y")
          assert len(kwargs) == 0
  
      def fn(x, y):
          pass
  
      x = {"x": 3, "y": 4}
      r = auto_param_call(fn1, x, signature_fn=fn)
  
      # 没提供的时候报错
      def fn(meiti1, meiti2, tigong):
          pass
  
      with pytest.raises(BaseException) as exc_info:
          auto_param_call(fn, {"tigong": 1})
      assert (
          "meiti1" in exc_info.value.args[0]
          and "meiti2" in exc_info.value.args[0]
      )
  
      # 默认值替换
      def fn(x, y=100):
          return x + y
  
      r = auto_param_call(fn, {"x": 10, "y": 20})
      assert r == 30
      assert auto_param_call(fn, {"x": 10, "z": 20}) == 110
  
      # 测试mapping的使用
      def fn(x, y=100):
          return x + y
  
      r = auto_param_call(
          fn,
          {"x1": 10, "y1": 20},
          mapping={"x1": "x", "y1": "y", "meiyong": "meiyong"},
      )
      assert r == 30
  
      # 测试不需要任何参数
      def fn():
          return 1
  
      assert 1 == auto_param_call(fn, {"x": 1})
  
      # 测试调用类的方法没问题
      assert 2 == auto_param_call(self.call_this, {"x": 1, "y": 1})
      assert 2 == auto_param_call(
          self.call_this,
          {"x": 1, "y": 1, "z": 1},
          mapping={"z": "self"},
      )
  
file_path: fastNLP/tests/core/utils/test_utils.py
imports: from functools import partial
  import pytest
  from fastNLP.core.utils.utils import auto_param_call, _check_valid_parameters_number, _get_fun_msg
  from fastNLP.core.metrics import Metric
label_desc: Use image node_id 1 for calling the TestAutoParamCall obj's underlying member method code with example usage: obj.test_basic() and returns: x, unknown, unknown, unknown, int