code: def trial(tmp_path):
      yield Trial(
          "mock",
          stub=True,
          storage=mock_storage_context(storage_path=str(tmp_path)),
      )
  
file_path: ray/python/ray/tune/tests/test_trial.py
imports: import os
  import sys
  import pytest
  from ray.exceptions import RayActorError, RayTaskError
  from ray.train import Checkpoint
  from ray.train.constants import RAY_TRAIN_COUNT_PREEMPTION_AS_FAILURE
  from ray.train._internal.session import _TrainingResult
  from ray.train._internal.storage import StorageContext
  from ray.tune.experiment import Trial
  from ray.train.tests.util import mock_storage_context
label_desc: Use image node_id 1 for calling a global function with example usage: trial(tmp_path) without return types