code: def _zero_for_irfft(z, axes):
      if axes is not None and not axes:
          return z
      axis = z.ndim - 1 if axes is None else axes[-1]
      try:
          size = z.shape[axis]
      except IndexError:
          return z  # only if axis is invalid, as occurs in some tests
      if size % 2:
          parts = [
              lax.slice_in_dim(z.real, 0, 1, axis=axis).real,
              lax.slice_in_dim(z.real, 1, size - 1, axis=axis),
              lax.slice_in_dim(z.real, size - 1, size, axis=axis).real,
          ]
      else:
          parts = [
              lax.slice_in_dim(z.real, 0, 1, axis=axis).real,
              lax.slice_in_dim(z.real, 1, size, axis=axis),
          ]
      return jnp.concatenate(parts, axis=axis)
  
imports: import itertools
  import numpy
  from absl.testing import absltest
  from absl.testing import parameterized
  import jax
  from jax import lax
  from jax import numpy
  from jax._src import config
  from jax._src import dtypes
  from jax._src import test_util
  from jax._src.numpy.util import promote_dtypes_complex
label_desc: Use image node_id 5 for calling a global function with example usage: _zero_for_irfft(z, axes) and returns: jnp, z, z