code: def repeatMinimization(model, Xtest, Ytest):
      callback = Callback(model, Xtest, Ytest)
  
      opt = gpflow.optimizers.Scipy()
      # print("Optimising for {} repetitions".format(nRepeats))
      for repeatIndex in range(nRepeats):
          # print(repeatIndex)
          opt.minimize(
              model.training_loss,
              model.trainable_variables,
              method="L-BFGS-B",
              tol=1e-11,
              options=dict(disp=False, maxiter=reduce_in_tests(2000)),
              step_callback=callback,
              compile=True,
          )
      return callback
  
file_path: GPflow/doc/sphinx/notebooks/theory/FITCvsVFE.py
imports: import numpy
  import tensorflow
  import gpflow
  from gpflow.ci_utils import reduce_in_tests
label_desc: Use image node_id 9 for calling a global function with example usage: repeatMinimization(model, Xtest, Ytest) and returns: callback