code: def assert_and_log(
      cu_shap_values,
      golden_result_values,
      fx,
      expected,
      tolerance=1e-02,
  ):
      close_values = np.allclose(
          cu_shap_values,
          golden_result_values,
          rtol=tolerance,
          atol=tolerance,
      )
  
      expected_sum = np.allclose(
          1.00,
          np.sum(cp.asnumpy(cu_shap_values)) / (fx - expected),
          rtol=1e-01,
      )
  
      if not close_values:
          print("cu_shap_values: ")
          print(cu_shap_values)
          print("golden_result_values")
          print(golden_result_values)
  
      if not expected_sum:
          print(np.sum(cp.asnumpy(cu_shap_values)))
  
      assert expected_sum
      assert close_values
  
imports: from sklearn.model_selection import train_test_split
  from cuml.testing.utils import create_synthetic_dataset, ClassEnumerator, get_shap_values
  from cuml.datasets import make_regression
  from cuml.internals.import_utils import has_shap
  from cuml.internals.import_utils import has_scipy
  from cuml import KernelExplainer
  from cuml import Lasso
  import sklearn.neighbors
  import pytest
  import math
  from cuml.internals.safe_imports import cpu_only_import
  import cuml
  from cuml.internals.safe_imports import gpu_only_import
label_desc: Use image node_id 1 for calling a global function with example usage: assert_and_log(cu_shap_values, golden_result_values, fx, expected, tolerance) without return types