code: def _get_intermediate_plot(
      info: _IntermediatePlotInfo,
  ) -> "go.Figure":
      layout = go.Layout(
          title="Intermediate Values Plot",
          xaxis={"title": "Step"},
          yaxis={"title": "Intermediate Value"},
          showlegend=False,
      )
  
      trial_infos = info.trial_infos
  
      if len(trial_infos) == 0:
          return go.Figure(data=[], layout=layout)
  
      default_marker = {"maxdisplayed": 10}
  
      traces = [
          go.Scatter(
              x=tuple((x for x, _ in tinfo.sorted_intermediate_values)),
              y=tuple((y for _, y in tinfo.sorted_intermediate_values)),
              mode="lines+markers",
              marker=default_marker
              if tinfo.feasible
              else {**default_marker, "color": "#CCCCCC"},  # type: ignore[dict-item]
              name="Trial{}".format(tinfo.trial_number),
          )
          for tinfo in trial_infos
      ]
  
      return go.Figure(data=traces, layout=layout)
  
file_path: optuna/optuna/visualization/_intermediate_values.py
imports: from __future__ import annotations
  from typing import NamedTuple
  from optuna.logging import get_logger
  from optuna.samplers._base import _CONSTRAINTS_KEY
  from optuna.study import Study
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
  from optuna.visualization._plotly_imports import _imports
label_desc: Use image node_id 3 for calling a global function with example usage: _get_intermediate_plot(info) and returns: go, go