code: def plot_gp(x_min, x_max, x, y, train_features, train_labels):
      fig = plt.figure(figsize=(16, 10))
      fig.suptitle(
          "Gaussian Process and Utility Function After {} Steps".format(
              len(train_features)
          ),
          fontdict={"size": 30},
      )
  
      gs = gridspec.GridSpec(2, 1, height_ratios=[3, 1])
      axis = plt.subplot(gs[0])
      acq = plt.subplot(gs[1])
  
      gp = GaussianProcessRegressor(
          kernel=Matern(nu=2.5),
          n_restarts_optimizer=25,
      )
  
      gp.fit(train_features, train_labels)
      mu, sigma = gp.predict(x, return_std=True)
  
      axis.plot(x, y, linewidth=3, label="Target")
      axis.plot(
          train_features.flatten(),
          train_labels,
          "D",
          markersize=8,
          label="Observations",
          color="r",
      )
      axis.plot(x, mu, "--", color="k", label="Prediction")
  
      axis.fill(
          np.concatenate([x, x[::-1]]),
          np.concatenate(
              [mu - 1.9600 * sigma, (mu + 1.9600 * sigma)[::-1]]
          ),
          alpha=0.6,
          fc="c",
          ec="None",
          label="95% confidence interval",
      )
  
      axis.set_xlim((x_min, x_max))
      axis.set_ylim((None, None))
      axis.set_ylabel("f(x)", fontdict={"size": 20})
      axis.set_xlabel("x", fontdict={"size": 20})
  
      bounds = np.asarray([[x_min, x_max]])
  
      acquisition_fucntion_kappa = 5
  
      mean, std = gp.predict(x, return_std=True)
      acquisition_fucntion_values = (
          mean + acquisition_fucntion_kappa * std
      )
  
      acq.plot(
          x,
          acquisition_fucntion_values,
          label="Utility Function",
          color="purple",
      )
  
      acq.plot(
          x[np.argmax(acquisition_fucntion_values)],
          np.max(acquisition_fucntion_values),
          "*",
          markersize=15,
          label="Next Best Guess",
          markerfacecolor="gold",
          markeredgecolor="k",
          markeredgewidth=1,
      )
      acq.set_xlim((x_min, x_max))
      acq.set_ylim((0, np.max(acquisition_fucntion_values) + 0.5))
      acq.set_ylabel("Utility", fontdict={"size": 20})
      acq.set_xlabel("x", fontdict={"size": 20})
  
      axis.legend(loc=2, bbox_to_anchor=(1.01, 1), borderaxespad=0.0)
      acq.legend(loc=2, bbox_to_anchor=(1.01, 1), borderaxespad=0.0)
  
file_path: advisor/visualization/visualize_bayesian_optimization.py
imports: import numpy
  from sklearn.gaussian_process import GaussianProcessRegressor
  from sklearn.gaussian_process.kernels import Matern
  from scipy.stats import norm
  from scipy.optimize import minimize
  import matplotlib.pyplot
  from matplotlib import gridspec
label_desc: Use image node_id 2 for calling a global function with example usage: plot_gp(x_min, x_max, x, y, train_features, train_labels) without return types