code: def test_error_bar_in_optimization_history(direction: str) -> None:
      def objective(trial: Trial) -> float:
          return trial.suggest_float("x", 0, 1)
  
      studies = [create_study(direction=direction) for _ in range(3)]
      suggested_params = [0.1, 0.3, 0.2]
      for x, study in zip(suggested_params, studies):
          study.enqueue_trial({"x": x})
          study.optimize(objective, n_trials=1)
      info_list = _get_optimization_history_info_list(
          studies,
          target=None,
          target_name="Objective Value",
          error_bar=True,
      )
      mean = np.mean(suggested_params).item()
      std = np.std(suggested_params).item()
      value_states = [_ValueState.Feasible]
      assert info_list == [
          _OptimizationHistoryInfo(
              [0],
              _ValuesInfo(
                  [mean], [std], "Objective Value", value_states
              ),
              _ValuesInfo([mean], [std], "Best Value", value_states),
          )
      ]
  
imports: from __future__ import annotations
  from io import BytesIO
  import math
  from typing import Sequence
  import numpy
  import pytest
  from optuna import samplers
  from optuna import TrialPruned
  from optuna.study import create_study
  from optuna.testing.objectives import fail_objective
  from optuna.testing.objectives import pruned_objective
  from optuna.trial import FrozenTrial
  from optuna.trial import Trial
  from optuna.visualization._optimization_history import _get_optimization_history_info_list
  from optuna.visualization._optimization_history import _get_optimization_history_plot
  from optuna.visualization._optimization_history import _OptimizationHistoryInfo
  from optuna.visualization._optimization_history import _ValuesInfo
  from optuna.visualization._optimization_history import _ValueState
label_desc: Use image node_id 11 for calling a global function with example usage: test_error_bar_in_optimization_history(direction) and returns: trial