class_docstr: Class for fitting Gaussian processes. 
class_docstr_tok: ["Class","for","fitting","Gaussian","processes","."]
docstr: Gets the GP to use in the current iteration. 
docstr_tok: ["Gets","the","GP","to","use","in","the","current","iteration","."]
code: def get_next_gp(self):
      """Gets the GP to use in the current iteration."""
      if self.options.hp_tune_probs == "adaptive":
          self.hp_tune_probs = self._get_adaptive_hp_tune_probs()
      method = np.random.choice(
          self.methods_to_use, p=self.hp_tune_probs
      )
      fit_type = self.hp_tune_results[method][0]
      if fit_type in ["fitted_gp", "post_fitted_gp"]:
          gp = self.hp_tune_results[method][1]
      elif fit_type in [
          "sample_hps_with_probs",
          "post_sample_hps_with_probs",
      ]:
          next_gp_hps = self.hp_tune_results[method][1].pop(0)
          self.hp_tune_results[method][1].append(next_gp_hps)
          gp = self.build_gp(
              next_gp_hps[0],
              next_gp_hps[1],
              other_gp_params=next_gp_hps[2],
              build_posterior=False,
          )
      return (fit_type, method, gp)
  
imports: from __future__ import division
  from argparse import Namespace
  from itertools import product
  import sys
  import numpy
  from ..distributions.model import Model
  from ..distributions import continuous
  from ..distributions import discrete
  from ..utils.general_utils import stable_cholesky, draw_gaussian_samples, project_symmetric_to_psd_cone, solve_lower_triangular, solve_upper_triangular
  from ..utils.oper_utils import direct_ft_maximise, pdoo_maximise, random_maximise, random_sample_cts_dscr
  from ..utils.option_handler import get_option_specs, load_options
  from ..utils.reporters import get_reporter
label_desc: Use image node_id 17 for calling the GPFitter obj's underlying member method code with example usage: obj.get_next_gp() and returns: fit_type,  method,  gp