<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def normalize(self, inplace=True):
 """ Normalizes the pdf of the distribution so that it integrates to 1 over all the variables. Parameters inplace: boolean If inplace=True it will modify the distribution itself, else would return a new distribution. Returns ------- CustomDistribution or None: if inplace=True (default) returns None if inplace=False returns a new CustomDistribution instance. Examples -------- 0.117099663049 0.0585498315243 """

        phi = self if inplace else self.copy()
        pdf = self.pdf

        pdf_mod = integrate.nquad(pdf, [[-np.inf, np.inf] for var in self.variables])[0]

        phi._pdf = lambda *args: pdf(*args) / pdf_mod

        if not inplace:
            return phi