code: def test_hyperopt_with_time_budget(
      csv_filename, tmpdir, ray_cluster_7cpu
  ):
      """Tests that incomplete checkpoints created by RayTune when time budget is hit doesn't throw errors because of
      missing .tune_metadata files in the checkpoint directories."""
      input_features = [text_feature()]
      output_features = [category_feature(output_feature=True)]
  
      rel_path = generate_data(
          input_features, output_features, csv_filename
      )
  
      config = {
          INPUT_FEATURES: input_features,
          OUTPUT_FEATURES: output_features,
          COMBINER: {TYPE: "concat"},
          HYPEROPT: {
              "goal": "minimize",
              "metric": "loss",
              "output_feature": output_features[0]["name"],
              "search_alg": {TYPE: "variant_generator"},
              "executor": {
                  "type": "ray",
                  # Ensure there is enough time for some trials to start and also for some to terminate
                  # to reproduce the exact issue of missing .tune_metadata files.
                  "time_budget_s": 120,
                  "cpu_resources_per_trial": 1,
                  "num_samples": 20,
                  "scheduler": {TYPE: "fifo"},
              },
              "parameters": {
                  "trainer.learning_rate": {
                      "lower": 0.0001,
                      "upper": 0.01,
                      "space": "loguniform",
                  }
              },
          },
      }
  
      experiment_name = f"test_hyperopt_{uuid.uuid4().hex}"
      hyperopt(
          config,
          dataset=rel_path,
          output_directory=tmpdir,
          experiment_name=experiment_name,
      )
  
imports: import json
  import os
  import os.path
  import uuid
  from typing import Dict, Tuple
  import pytest
  from ludwig.backend import initialize_backend
  from ludwig.constants import ACCURACY, AUTO, BATCH_SIZE, CATEGORY, COMBINER, EXECUTOR, HYPEROPT, INPUT_FEATURES, MAX_CONCURRENT_TRIALS, MODEL_ECD, MODEL_GBM, MODEL_TYPE, NAME, OUTPUT_FEATURES, RAY, TEST, TEXT, TRAINER, TRAINING, TYPE, VALIDATION
  from ludwig.globals import HYPEROPT_STATISTICS_FILE_NAME
  from ludwig.hyperopt.results import HyperoptResults
  from ludwig.hyperopt.run import hyperopt
  from ludwig.hyperopt.utils import update_hyperopt_params_with_defaults
  from ludwig.schema.model_config import ModelConfig
  from ludwig.utils import fs_utils
  from ludwig.utils.data_utils import load_json, use_credentials
  from tests.integration_tests.utils import category_feature, generate_data, minio_test_creds, private_param, remote_tmpdir, text_feature
  from ludwig.hyperopt.execution import get_build_hyperopt_executor, RayTuneExecutor
label_desc: Use image node_id 13 for calling a global function with example usage: test_hyperopt_with_time_budget(csv_filename, tmpdir, ray_cluster_7cpu) without return types