code: def _create_scatter(
      x: list[Any], y: list[Any], is_feasible: bool
  ) -> Scatter:
      edge_color = "Gray"
      marker_color = "black" if is_feasible else "#cccccc"
      name = "Feasible Trial" if is_feasible else "Infeasible Trial"
      return go.Scatter(
          x=x,
          y=y,
          marker={
              "line": {"width": 2.0, "color": edge_color},
              "color": marker_color,
          },
          mode="markers",
          name=name,
          showlegend=False,
      )
  
imports: from __future__ import annotations
  import math
  from typing import Any
  from typing import Callable
  from typing import NamedTuple
  from optuna.logging import get_logger
  from optuna.samplers._base import _CONSTRAINTS_KEY
  from optuna.study import Study
  from optuna.study import StudyDirection
  from optuna.trial import FrozenTrial
  from optuna.trial import TrialState
  from optuna.visualization._plotly_imports import _imports
  from optuna.visualization._utils import _check_plot_args
  from optuna.visualization._utils import _filter_nonfinite
  from optuna.visualization._utils import _is_log_scale
  from optuna.visualization._utils import _is_numerical
  from optuna.visualization._utils import _is_reverse_scale
label_desc: Use image node_id 4 for calling a global function with example usage: _create_scatter(x, y, is_feasible) and returns: go