code: def tune_trainable(api_key_file):
      """Example for using a WandTrainableMixin with the class API."""
      tuner = tune.Tuner(
          WandbTrainable,
          tune_config=tune.TuneConfig(
              metric="loss",
              mode="min",
          ),
          param_space={
              "mean": tune.grid_search([1, 2, 3, 4, 5]),
              "sd": tune.uniform(0.2, 0.8),
              "wandb": {
                  "api_key_file": api_key_file,
                  "project": "Wandb_example",
              },
          },
      )
      results = tuner.fit()
  
      return results.get_best_result().config
  
file_path: wandb/tests/functional_tests/t0_main/raytune/t4_trainable.py
imports: import numpy
  import wandb
  from _test_support import get_wandb_api_key_file
  from ray import tune
  from ray.tune import Trainable
  from ray.tune.integration.wandb import WandbTrainableMixin
label_desc: Use image node_id 1 for calling a global function with example usage: tune_trainable(api_key_file) and returns: results