code: def simple_mean_function(max_iters=100, optimize=True, plot=True):
      
      #create  simple mean function
      mf = GPy.core.Mapping(1,1)
      mf.f = np.sin
      mf.update_gradients = lambda a,b: None
  
      X = np.linspace(0,10,50).reshape(-1,1)
      Y = np.sin(X) + 0.5*np.cos(3*X) + 0.1*np.random.randn(*X.shape)
  
      k =GPy.kern.RBF(1)
      lik = GPy.likelihoods.Gaussian()
      m = GPy.core.GP(X, Y, kernel=k, likelihood=lik, mean_function=mf)
      if optimize:
          m.optimize(max_iters=max_iters)
      if plot:
          m.plot(plot_limits=(-10,15))
      return m
docs: The simplest possible mean function. No parameters, just a simple Sinusoid.