code: def target_generator(X, add_noise=False):
      target = 0.5 + np.sin(3 * X)
      if add_noise:
          rng = np.random.RandomState(1)
          target += rng.normal(0, 0.3, size=target.shape)
      return target.squeeze()
  
imports: import numpy
  import matplotlib.pyplot
  from sklearn.gaussian_process import GaussianProcessRegressor
  from sklearn.gaussian_process.kernels import RBF, WhiteKernel
  from matplotlib.colors import LogNorm
label_desc: Use image node_id 1 for calling a global function with example usage: target_generator(X, add_noise) and returns: target