code: def test_get_all_trials_params_order(
      storage_mode: str, param_names: list[str]
  ) -> None:
      # We don't actually require that all storages to preserve the order of parameters,
      # but all current implementations do, so we test this property.
      with StorageSupplier(storage_mode) as storage:
          study_id = storage.create_new_study(
              directions=[StudyDirection.MINIMIZE]
          )
          trial_id = storage.create_new_trial(
              study_id,
              optuna.trial.create_trial(state=TrialState.RUNNING),
          )
          for param_name in param_names:
              storage.set_trial_param(
                  trial_id,
                  param_name,
                  1.0,
                  distribution=FloatDistribution(0.0, 2.0),
              )
  
          trials = storage.get_all_trials(study_id)
          assert list(trials[0].params.keys()) == param_names
  
imports: from __future__ import annotations
  import copy
  from datetime import datetime
  import pickle
  import random
  from time import sleep
  from typing import Any
  from typing import Dict
  from typing import List
  from typing import Optional
  from typing import Tuple
  import numpy
  import pytest
  import optuna
  from optuna._typing import JSONSerializable
  from optuna.distributions import CategoricalDistribution
  from optuna.distributions import FloatDistribution
  from optuna.storages import _CachedStorage
  from optuna.storages import BaseStorage
  from optuna.storages import InMemoryStorage
  from optuna.storages import RDBStorage
  from optuna.storages._base import DEFAULT_STUDY_NAME_PREFIX
  from optuna.study._frozen import FrozenStudy
  from optuna.study._study_direction import StudyDirection
  from optuna.testing.storages import STORAGE_MODES
  from optuna.testing.storages import StorageSupplier
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
label_desc: Use image node_id 27 for calling a global function with example usage: test_get_all_trials_params_order(storage_mode, param_names) without return types