code: def good_enough(myscore: float, refscore: float, training_size: int):
      myerr = 1.0 - myscore
      referr = 1.0 - refscore
      # Extra discount for uncertainty based on the training data.
      # Totally empirical; for <10 samples, the error is allowed
      # to be ~50%, which is a total randomness. But this is ok,
      # since we don't expect the model to be trained from this few
      # samples.
      c = (10000 + training_size) / (100 + 5 * training_size)
      thresh_rel = referr * (1 + ERROR_TOLERANCE_REL * c)
      thresh_abs = referr + ERROR_TOLERANCE_ABS * c
      good_rel = myerr <= thresh_rel
      good_abs = myerr <= thresh_abs
      assert good_rel or good_abs, (
          f"The model is surely not good enough "
          f"(cuml error = {myerr} > "
          f"min(abs threshold = {thresh_abs}; rel threshold = {thresh_rel}))"
      )
  
imports: import cuml.internals.logger
  import cuml
  import cuml.svm
  import sklearn.svm
  from cuml.testing.utils import unit_param, quality_param, stress_param
  from queue import Empty
  import cuml.model_selection
  import cuml.datasets
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
  import gc
  import multiprocessing
  import time
  import math
  from cuml.internals.safe_imports import gpu_only_import
  from cuml.common import input_to_cuml_array
label_desc: Use image node_id 1 for calling a global function with example usage: good_enough(myscore, refscore, training_size) without return types