code: def _plot_solution(
      ax, x_best, y_best, solution_label, xlabel, ylabel
  ):
      """Plot the given solution with appropriate labels."""
      if y_best is None:
          ax.axvline(x=x_best, label=solution_label, ls="--")
      else:
          ax.plot(x_best, y_best, "m*", ms=10, label=solution_label)
      ax.legend()
      ax.set_xlabel(xlabel)
      ax.set_ylabel(ylabel)
  
file_path: fairlearn/fairlearn/postprocessing/_plotting.py
imports: from sklearn.utils.validation import check_is_fitted
  from ._constants import _MATPLOTLIB_IMPORT_ERROR_MESSAGE
  from ._threshold_optimizer import ThresholdOptimizer
label_desc: Use image node_id 2 for calling a global function with example usage: _plot_solution(ax, x_best, y_best, solution_label, xlabel, ylabel) without return types