code: def test_check_distribution_suggest_uniform(
      storage_mode: str,
  ) -> None:
      sampler = samplers.RandomSampler()
      with StorageSupplier(storage_mode) as storage:
          study = create_study(storage=storage, sampler=sampler)
          trial = Trial(
              study, study._storage.create_new_trial(study._study_id)
          )
  
          with pytest.warns() as record:
              trial.suggest_uniform("x", 10, 20)
              trial.suggest_uniform("x", 10, 20)
              trial.suggest_uniform("x", 10, 30)
  
          # we expect exactly one warning (not counting ones caused by deprecation)
          assert (
              len([r for r in record if r.category != FutureWarning])
              == 1
          )
  
          with pytest.raises(ValueError):
              trial.suggest_int("x", 10, 20)
  
          trial = Trial(
              study, study._storage.create_new_trial(study._study_id)
          )
          with pytest.raises(ValueError):
              trial.suggest_int("x", 10, 20)
  
imports: from __future__ import annotations
  import datetime
  import math
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Tuple
  from unittest.mock import Mock
  from unittest.mock import patch
  import warnings
  import numpy
  import pytest
  import optuna
  from optuna import create_study
  from optuna import distributions
  from optuna import load_study
  from optuna import samplers
  from optuna import storages
  from optuna.distributions import CategoricalDistribution
  from optuna.distributions import FloatDistribution
  from optuna.distributions import IntDistribution
  from optuna.testing.pruners import DeterministicPruner
  from optuna.testing.samplers import DeterministicSampler
  from optuna.testing.storages import STORAGE_MODES
  from optuna.testing.storages import StorageSupplier
  from optuna.testing.tempfile_pool import NamedTemporaryFilePool
  from optuna.trial import Trial
  from optuna.trial._trial import _LazyTrialSystemAttrs
label_desc: Use image node_id 2 for calling a global function with example usage: test_check_distribution_suggest_uniform(storage_mode) without return types