<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _central2(f, fx, x, h):
 """Eq. 8"""

        n = len(x)
        ee = np.diag(h)
        dtype = np.result_type(fx)
        g = np.empty(n, dtype=dtype)
        gg = np.empty(n, dtype=dtype)
        for i in range(n):
            g[i] = f(x + ee[i])
            gg[i] = f(x - ee[i])

        hess = np.empty((n, n), dtype=dtype)
        np.outer(h, h, out=hess)
        for i in range(n):
            for j in range(i, n):
                hess[i, j] = (f(x + ee[i, :] + ee[j, :])
                              + f(x - ee[i, :] - ee[j, :])
                              - g[i] - g[j] + fx
                              - gg[i] - gg[j] + fx) / (2 * hess[j, i])
                hess[j, i] = hess[i, j]
        return hess