code: def _assert_allclose(
      my_result: Union[float, np.ndarray],
      sklearn_result: Union[float, np.ndarray],
      atol: float = 1e-8,
  ) -> None:
      """
      测试对比结果，这里不用非得是必须数组且维度对应，一些其他情况例如 np.allclose(np.array([[1e10, ], ]), 1e10+1) 也是 True
      :param my_result: 可以不限设备等
      :param sklearn_result:
      :param atol:
      :return:
      """
      assert np.allclose(a=my_result, b=sklearn_result, atol=atol)
  
imports: import os, sys
  import socket
  from typing import Union
  import numpy
  from fastNLP.envs.imports import _NEED_IMPORT_TORCH
label_desc: Use image node_id 3 for calling a global function with example usage: _assert_allclose(my_result, sklearn_result, atol) without return types