code: def test_no_metric_mode_one_trial(ray_start_2_cpus):
      def f(config):
          train.report(dict(x=1))
  
      results = tune.Tuner(
          f, tune_config=tune.TuneConfig(num_samples=1)
      ).fit()
      # This should not throw any exception
      best_result = results.get_best_result()
      assert best_result
  
file_path: ray/python/ray/tune/tests/test_result_grid.py
imports: import pytest
  import ray
  from ray import train, tune
  from ray.train import Checkpoint, Result
  from ray.tune.result_grid import ResultGrid
  from ray.train.tests.util import create_dict_checkpoint, load_dict_checkpoint
label_desc: Use image node_id 7 for calling a global function with example usage: test_no_metric_mode_one_trial(ray_start_2_cpus) without return types