code: def test_base_tuner_distribution(tmp_path):
      num_workers = 3
  
      def _test_base_tuner():
          def build_model(hp):
              return hp.Int("a", 1, 100)
  
          tuner = SimpleTuner(
              oracle=keras_tuner.oracles.RandomSearchOracle(
                  objective=keras_tuner.Objective("score", "max"),
                  max_trials=10,
              ),
              hypermodel=build_model,
              directory=tmp_path,
          )
          tuner.search()
  
          if dist_utils.is_chief_oracle():
              # Model is just a score.
              scores = tuner.get_best_models(10)
              assert len(scores)
              assert scores == sorted(copy.copy(scores), reverse=True)
  
      mock_distribute.mock_distribute(
          _test_base_tuner, num_workers=num_workers, wait_for_chief=True
      )
  
imports: import copy
  import os
  from unittest import mock
  import numpy
  import portpicker
  import pytest
  import keras_tuner
  from keras_tuner.backend import keras
  from keras_tuner.distribute import oracle_client
  from keras_tuner.distribute import utils
  from keras_tuner.engine import hyperparameters
  from keras_tuner.test_utils import mock_distribute
  from keras_tuner.tuners import randomsearch
label_desc: Use image node_id 1 for calling a global function with example usage: test_base_tuner_distribution(tmp_path) and returns: hp