code: def zeta(
      x: paddle.Tensor,
      q: paddle.Tensor,
      /,
      *,
      out: Optional[paddle.Tensor] = None,
  ) -> paddle.Tensor:
      with ivy.ArrayMode(False):
          s, a = ivy.promote_types_of_inputs(x, q)
          s_, a_ = paddle.unsqueeze(x, -1), paddle.unsqueeze(q, -1)
          N = M = (
              paddle.to_tensor(8.0, dtype="float32")
              if q.dtype == paddle.float32
              else paddle.to_tensor(8.0, dtype="float64")
          )
          assert len(_BERNOULLI_COEFS) >= M
          k = paddle.unsqueeze(
              ivy.arange(N, dtype=q.dtype), tuple(range(q.ndim))
          )
          S = paddle.sum((a_ + k) ** -s_, -1)
          Q = ivy.divide((q + N) ** (1 - x), x - 1)
          T0 = (q + N) ** -x
          m = paddle.unsqueeze(
              ivy.arange(2 * M, dtype=s.dtype), tuple(range(s.ndim))
          )
          s_over_a = (s_ + m) / (a_ + N)
          s_over_a = ivy.where(
              s_over_a == 0,
              paddle.ones_like(s_over_a) * 1e-20,
              s_over_a,
          )
          T1 = paddle.cumprod(s_over_a, -1)[..., ::2]
          # t=np.array(T1)
          T1 = paddle.clip(T1, max=ivy.finfo(T1.dtype).max)
          coefs = paddle.unsqueeze(
              paddle.to_tensor(
                  _BERNOULLI_COEFS[: T1.shape[-1]], dtype=T1.dtype
              ),
              tuple(range(a.ndim)),
          )
          T1 = T1 / coefs
          T = T0 * (0.5 + paddle.sum(T1, -1))
          ans = S + Q + T
          mask = x < 1
          ans[mask] = ivy.nan
          return ans
  
imports: import operator
  from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import paddle
  from ivy.utils.exceptions import IvyNotImplementedException
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_device_and_dtypes, with_unsupported_dtypes
  import ivy.functional.backends.paddle
  import ivy
  from ivy import promote_types_of_inputs
  from ivy.functional.backends.paddle.elementwise import _elementwise_helper
  from ..None import backend_version
label_desc: Use image node_id 18 for calling a global function with example usage: zeta() and returns: ans