Can I use conjugate gradient optimizer for registration in python?How can I do ?

Through another thread (Monitoring registration progress in python - and status of itk vs simpleitk for registration) I realised that switching to LBFGS or Conjugate Gradient is at least easy in simpleitk (where additionally there is no question of v4 or no v4):
https://simpleitk.readthedocs.io/en/master/registrationOverview.html#optimizer

In the example https://simpleitk.readthedocs.io/en/master/link_ImageRegistrationMethod1_docs.html, just use R.SetOptimizerAsLBFGSB() or R.SetOptimizerAsConjugateGradientLineSearch()