code: def generate_data(num_data):
      # First generate random inputs
      X = np.random.rand(num_data, 1)
  
      # Now generate values of a latent GP
      kern = gpflow.kernels.SquaredExponential(lengthscales=0.1)
      K = kern(X)
      f = np.random.multivariate_normal(
          mean=np.zeros(num_data), cov=K
      ).reshape(-1, 1)
  
      # Finally convert f values into ordinal values Y
      Y = np.round((f + f.min()) * 3)
      Y = Y - Y.min()
      Y = np.asarray(Y, np.float64)
  
      return X, f, Y
  
imports: import matplotlib.pyplot
  import numpy
  import gpflow
label_desc: Use image node_id 1 for calling a global function with example usage: generate_data(num_data) and returns: X,  f,  Y