def _test_pack(self, grad, hess):
        """Test GradHessPacker
        compare
        1. the difference between result before and after pack
        2. the difference between sum_grad, sum_hess and the result using pack
        Args:
            grad: the grad for pack
            hess: the hess for pack
        """
        grad_hess_encrypted = self.pack.pack_and_encrypt_grad_hess(grad, hess)
        grad_hess_ciphertext = [i.ciphertext(False) for i in grad_hess_encrypted]
        g, h = self.pack.decrypt_and_unpack_grad_hess(grad_hess_ciphertext, self.private_key)
        np.testing.assert_almost_equal(grad, g, decimal=32)
        np.testing.assert_almost_equal(hess, h, decimal=32)

        sum_g = sum(grad)
        sum_h = sum(hess)

        sgh_encrypt = sum(grad_hess_encrypted)
        sgh_ciphertext = sgh_encrypt.ciphertext(False)
        sg, sh = self.pack.decrypt_and_unpack_grad_hess([sgh_ciphertext], self.private_key)
        np.testing.assert_almost_equal(sum_g, sg)
        np.testing.assert_almost_equal(sum_h, sh)
Test GradHessPacker
        compare
        1. the difference between result before and after pack
        2. the difference between sum_grad, sum_hess and the result using pack
        Args:
            grad: the grad for pack
            hess: the hess for pack
        
test/tree_model/test_pack.py