code: def construct_kde(samples_array, use_kombine=False):
      
      if use_kombine:
          try:
              import kombine
          except ImportError:
              raise ImportError("kombine is not installed.")
      # construct the kde
      if use_kombine:
          kde = kombine.clustered_kde.KDE(samples_array)
      else:
          kde = scipy.stats.gaussian_kde(samples_array.T)
      return kde
docs: Constructs a KDE from the given samples.