code: def test_set_max_concurrent_trials(
      hyperopt_config_old, hyperopt_config_expected, ray_cluster_4cpu
  ):
      backend = initialize_backend(RAY)
      if (
          hyperopt_config_old[EXECUTOR].get(MAX_CONCURRENT_TRIALS)
          == AUTO
      ):
          hyperopt_config_old[EXECUTOR][
              MAX_CONCURRENT_TRIALS
          ] = backend.max_concurrent_trials(hyperopt_config_old)
      assert hyperopt_config_old == hyperopt_config_expected
  
file_path: ludwig/tests/ludwig/backend/test_ray.py
imports: import copy
  from unittest.mock import patch
  import pytest
  from ray.train.horovod import HorovodConfig
  from ray.train.torch import TorchConfig
  from ludwig.backend import initialize_backend
  from ludwig.backend.ray import get_trainer_kwargs
  from ludwig.constants import AUTO, EXECUTOR, MAX_CONCURRENT_TRIALS, RAY
label_desc: Use image node_id 2 for calling a global function with example usage: test_set_max_concurrent_trials(hyperopt_config_old, hyperopt_config_expected, ray_cluster_4cpu) without return types