code: def get_gp_sampler_for_parallel_strategy(gp, anc_data):
      """Returns a function that can draw samples from the posterior gp depending on the
      parallel strategy and the evaluations in progress.
      """
  
      # 1. With hallucinations
      def _get_halluc_gp_draw_samples(_gp, _halluc_pts):
          """Hallucinated sampler."""
          return (
              lambda x: _gp.draw_samples_with_hallucinated_observations(
                  1, x, _halluc_pts
              ).ravel()
          )
  
      def _get_naive_gp_draw_samples(_gp):
          """Naive sampler."""
          return lambda x: _gp.draw_samples(1, x).ravel()
  
      # Check parallelisation strategy and return
      if (
          anc_data.handle_parallel == "halluc"
          and len(anc_data.eval_points_in_progress) > 0
      ):
          if anc_data.is_mf:
              return _get_halluc_gp_draw_samples(
                  gp, anc_data.eval_fidel_points_in_progress
              )
          else:
              return _get_halluc_gp_draw_samples(
                  gp, anc_data.eval_points_in_progress
              )
      else:
          return _get_naive_gp_draw_samples(gp)
  
imports: from __future__ import division
  from argparse import Namespace
  from copy import copy
  import numpy
  from scipy.stats import norm
  from ..utils.general_utils import solve_lower_triangular
  from ..gp.gp_core import get_post_covar_from_raw_covar
  from ..exd.domains import EuclideanDomain
  from ..exd.exd_utils import maximise_with_method
label_desc: Use image node_id 3 for calling a global function with example usage: get_gp_sampler_for_parallel_strategy(gp, anc_data) and returns: function, function, _get_naive_gp_draw_samples, _get_halluc_gp_draw_samples, _get_halluc_gp_draw_samples