class_docstr: A parent class for DRIV-learner regressor classes.
  
  A DRIV-learner estimates endogenous treatment effects for compliers with machine learning models.
  
  Details of DR-learner are available at Kennedy (2020) (https://arxiv.org/abs/2004.14497).
  The DR moment condition for LATE comes from Chernozhukov et al (2018) (https://academic.oup.com/ectj/article/21/1/C1/5056401).
docstr: Runs a single bootstrap. Fits on bootstrapped sample, then predicts on whole population.
docstr_tok: ["Runs","a","single","bootstrap",".","Fits","on","bootstrapped","sample",",","then","predicts","on","whole","population","."]
code: def bootstrap(
      self, X, assignment, treatment, y, p, pZ, size=10000, seed=None
  ):
      """Runs a single bootstrap. Fits on bootstrapped sample, then predicts on whole population."""
      idxs = np.random.choice(np.arange(0, X.shape[0]), size=size)
      X_b = X[idxs]
  
      if isinstance(p[0], (np.ndarray, pd.Series)):
          p0_b = {self.t_groups[0]: convert_pd_to_np(p[0][idxs])}
      else:
          p0_b = {g: prop[idxs] for g, prop in p[0].items()}
      if isinstance(p[1], (np.ndarray, pd.Series)):
          p1_b = {self.t_groups[0]: convert_pd_to_np(p[1][idxs])}
      else:
          p1_b = {g: prop[idxs] for g, prop in p[1].items()}
  
      pZ_b = pZ[idxs]
      assignment_b = assignment[idxs]
      treatment_b = treatment[idxs]
      y_b = y[idxs]
      self.fit(
          X=X_b,
          assignment=assignment_b,
          treatment=treatment_b,
          y=y_b,
          p=(p0_b, p1_b),
          pZ=pZ_b,
          seed=seed,
      )
      te_b = self.predict(X=X)
      return te_b
  
imports: import logging
  from copy import deepcopy
  import numpy
  import pandas
  from causalml.inference.meta.explainer import Explainer
  from causalml.inference.meta.utils import check_treatment_vector, check_p_conditions, convert_pd_to_np
  from causalml.metrics import regression_metrics, classification_metrics
  from causalml.propensity import compute_propensity_score
  from scipy.stats import norm
  from sklearn.model_selection import cross_val_predict, KFold
  from tqdm import tqdm
  from xgboost import XGBRegressor
label_desc: Use image node_id 7 for calling the BaseDRIVLearner obj's underlying member method code with example usage: obj.bootstrap(X, assignment, treatment, y, p, pZ, size, seed) and returns: te_b