code: def plot_2d_function(
      func, bounds, x_label="x", y_label="y", title=None
  ):
      """Plots a 2D function in bounds."""
      # pylint: disable=unused-variable
      dim_grid_size = 20
      x_grid = np.linspace(bounds[0][0], bounds[0][1], dim_grid_size)
      y_grid = np.linspace(bounds[1][0], bounds[1][1], dim_grid_size)
      XX, YY = np.meshgrid(x_grid, y_grid)
      f_vals = func(XX.ravel(), YY.ravel())
      FF = f_vals.reshape(dim_grid_size, dim_grid_size)
      # Create plot
      import matplotlib.pyplot as plt
      from mpl_toolkits.mplot3d import Axes3D
  
      fig = plt.figure()
      ax = fig.gca(projection="3d")
      ax.plot_surface(XX, YY, FF)
      plt.xlabel(x_label)
      plt.ylabel(y_label)
      if title is not None:
          plt.title(title)
      return fig, ax, plt
  
file_path: dragonfly/dragonfly/utils/ancillary_utils.py
imports: import numpy
label_desc: Use image node_id 10 for calling a global function with example usage: plot_2d_function(func, bounds, x_label, y_label, title) and returns: fig,  ax,  plt