human
What is a the Python code you requested given the following:
Complete the below
def _drv2_moment(self, n, *args):

    ''''Non-central moment of discrete distribution.'
    '''
assistant
#Here is the Python code you requested.
    def fun(x):
        return (np.power(x, n) * self._pmf(x, *args))
    return _expect(fun, self.a, self.b, self.ppf(0.5, *args), self.inc)