code: def zeta(
      x: np.ndarray,
      q: np.ndarray,
      /,
      *,
      out: Optional[np.ndarray] = None,
  ) -> np.ndarray:
      temp = np.logical_and(
          np.greater(x, 0), np.equal(np.remainder(x, 2), 0)
      )
      temp = np.logical_and(temp, np.less_equal(q, 0))
      temp = np.logical_and(temp, np.equal(np.remainder(q, 1), 0))
      inf_indices = np.logical_or(temp, np.equal(x, 1))
      temp = np.logical_and(
          np.not_equal(np.remainder(x, 2), 0), np.greater(x, 1)
      )
      temp = np.logical_and(temp, np.less_equal(q, 0))
      nan_indices = np.logical_or(temp, np.less(x, 1))
      n, res = 1, 1 / q**x
      while n < 10000:
          term = 1 / (q + n) ** x
          n, res = n + 1, res + term
      ret = np.round(res, decimals=4)
      ret[nan_indices] = np.nan
      ret[inf_indices] = np.inf
      return ret
  
imports: from typing import Optional, Union, Tuple, List, Sequence
  import numpy
  import numpy.typing
  import ivy
  from ivy import promote_types_of_inputs
  from ivy.functional.backends.numpy.helpers import _scalar_output_to_0d_array
  from ivy.func_wrapper import with_unsupported_dtypes
  from .None import backend_version
label_desc: Use image node_id 16 for calling a global function with example usage: zeta() and returns: ret