code: def stratify(self):
  		Y, D, X = self.raw_data['Y'], self.raw_data['D'], self.raw_data['X']
  		pscore = self.raw_data['pscore']
  		if isinstance(self.blocks, int):
  			blocks = split_equal_bins(pscore, self.blocks)
  		else:
  			blocks = self.blocks[:]
  			blocks[0] = 0
  		def subset(p_low, p_high):
  			return (p_low < pscore) & (pscore <= p_high)
  		subsets = [subset(*ps) for ps in zip(blocks, blocks[1:])]
  		strata = [CausalModel(Y[s], D[s], X[s]) for s in subsets]
  		self.strata = Strata(strata, subsets, pscore)