code: def __init__(
      self,
      expt_dir,
      covar="Matern52",
      mcmc_iters=20,
      pending_samples=100,
      noiseless=False,
      burnin=100,
      grid_subset=20,
      constraint_violating_value=np.inf,
      verbosity=0,
      visualize2D=False,
  ):
      self.cov_func = getattr(gp, covar)
      self.locker = Locker()
      self.state_pkl = os.path.join(expt_dir, self.__module__ + ".pkl")
  
      self.stats_file = os.path.join(
          expt_dir, self.__module__ + "_hyperparameters.txt"
      )
      self.mcmc_iters = int(mcmc_iters)
      self.burnin = int(burnin)
      self.needs_burnin = True
      self.pending_samples = pending_samples
      self.D = -1
      self.hyper_iters = 1
      # Number of points to optimize EI over
      self.grid_subset = int(grid_subset)
      self.noiseless = bool(int(noiseless))
      self.hyper_samples = []
      self.constraint_hyper_samples = []
      self.ff = None
      self.ff_samples = []
      self.verbosity = int(verbosity)
  
      self.noise_scale = 0.1  # horseshoe prior
      self.amp2_scale = 1  # zero-mean log normal prior
      self.max_ls = 2  # top-hat prior on length scales
  
      self.constraint_noise_scale = 0.1  # horseshoe prior
      self.constraint_amp2_scale = 1  # zero-mean log normal prio
      self.constraint_gain = 1  # top-hat prior on length scales
      self.constraint_max_ls = 2  # top-hat prior on length scales
      self.bad_value = float(constraint_violating_value)
      self.visualize2D = visualize2D
  
      self.ls = None
      self.amp2 = None
      self.noise = None
      self.mean = None
      self.constraint_ls = None
      self.constraint_amp2 = None
      self.constraint_mean = None
      self.constraint_noise = None
  
imports: import os
  from ..None import gp
  import sys
  from ..None import util
  import tempfile
  import numpy
  import math
  import numpy.random
  import scipy.linalg
  import scipy.stats
  import scipy.optimize
  import pickle
  import matplotlib.pyplot
  import multiprocessing
  import copy
  from ..helpers import *
  from ..Locker import *
  import logging
label_desc: Use image node_id 1 to create a new GPConstrainedEIChooser object  with example: obj = GPConstrainedEIChooser(expt_dir, covar, mcmc_iters, pending_samples, noiseless, burnin, grid_subset, constraint_violating_value, verbosity, visualize2D)