[docs]classNormalPSpace(SingleContinuousPSpace):def__new__(cls,name,mean,std):mean,std=sympify(mean),sympify(std)_value_check(std>0,"Standard deviation must be positive")x=Symbol(name)pdf=exp(-(x-mean)**2/(2*std**2))/(sqrt(2*pi)*std)obj=SingleContinuousPSpace.__new__(cls,x,pdf)obj.mean=meanobj.std=stdobj.variance=std**2returnobjdefsample(self):return{self.value:random.normalvariate(self.mean,self.std)}