code: def test_quadratic1_rand():
      trials = Trials()
  
      argmin = fmin(
          fn=lambda x: (x - 3) ** 2,
          space=hp.uniform("x", -5, 5),
          algo=rand.suggest,
          max_evals=500,
          trials=trials,
          rstate=np.random.default_rng(np.random.PCG64(123)),
      )
  
      assert len(trials) == 500
      assert abs(argmin["x"] - 3.0) < 0.25
  
imports: import unittest
  import numpy
  from timeit import default_timer
  import time
  from hyperopt.early_stop import no_progress_loss
  from hyperopt.fmin import generate_trials_to_calculate
  import pytest
  from hyperopt import fmin, rand, tpe, hp, Trials, exceptions, space_eval, STATUS_FAIL, STATUS_OK
  from hyperopt.base import JOB_STATE_ERROR
label_desc: Use image node_id 1 for calling a global function with example usage: test_quadratic1_rand() without return types