code: def plot_2d_kernel_samples(
      ax: Axes, kernel: gpflow.kernels.Kernel
  ) -> None:
      n_grid = 30
      X = np.zeros((0, 2))
      Y = np.zeros((0, 1))
      model = gpflow.models.GPR((X, Y), kernel=deepcopy(kernel))
  
      Xplots = np.linspace(-0.6, 0.6, n_grid)
      Xplot1, Xplot2 = np.meshgrid(Xplots, Xplots)
      Xplot = np.stack([Xplot1, Xplot2], axis=-1)
      Xplot = Xplot.reshape([n_grid**2, 2])
  
      tf.random.set_seed(20220903)
      fs = model.predict_f_samples(Xplot, num_samples=1)
      fs = fs.numpy().reshape((n_grid, n_grid))
      ax.plot_surface(Xplot1, Xplot2, fs, cmap=coolwarm)
      ax.set_title("Example $f$")
  
file_path: GPflow/doc/sphinx/notebooks/getting_started/kernels.pct.py
imports: import os
  import warnings
  from copy import deepcopy
  import matplotlib.pyplot
  import numpy
  import tensorflow
  from matplotlib.axes import Axes
  from matplotlib.cm import coolwarm
  import gpflow
label_desc: Use image node_id 5 for calling a global function with example usage: plot_2d_kernel_samples(ax, kernel) without return types