code: def test_run_trial_catch_exception(storage_mode: str) -> None:
      with StorageSupplier(storage_mode) as storage:
          study = create_study(storage=storage)
          frozen_trial = _optimize._run_trial(
              study, fail_objective, catch=(ValueError,)
          )
          assert frozen_trial.state == TrialState.FAIL
          assert STUDY_TELL_WARNING_KEY not in frozen_trial.system_attrs
  
imports: from typing import Callable
  from typing import Generator
  from typing import Optional
  from unittest import mock
  from _pytest.logging import LogCaptureFixture
  import pytest
  from optuna import create_study
  from optuna import logging
  from optuna import Trial
  from optuna import TrialPruned
  from optuna.study import _optimize
  from optuna.study._tell import _tell_with_warning
  from optuna.study._tell import STUDY_TELL_WARNING_KEY
  from optuna.testing.objectives import fail_objective
  from optuna.testing.storages import STORAGE_MODES
  from optuna.testing.storages import StorageSupplier
  from optuna.trial import TrialState
label_desc: Use image node_id 5 for calling a global function with example usage: test_run_trial_catch_exception(storage_mode) without return types