code: def test_duplicate_label_is_error():
      trials = Trials()
  
      def fn(xy):
          x, y = xy
          return x**2 + y**2
  
      with pytest.raises(exceptions.DuplicateLabel):
          fmin(
              fn=fn,
              space=[hp.uniform("x", -5, 5), hp.uniform("x", -5, 5)],
              algo=rand.suggest,
              max_evals=500,
              trials=trials,
              rstate=np.random.default_rng(0),
          )
  
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 4 for calling a global function with example usage: test_duplicate_label_is_error() and returns: unknown