code: def _irfft_transpose(t, fft_lengths):
      # The transpose of IRFFT is the RFFT of the cotangent times a scaling
      # factor and a mask. The mask scales the cotangent for the Hermitian
      # symmetric components of the RFFT by a factor of two, since these components
      # are de-duplicated in the RFFT.
      x = fft(t, xla_client.FftType.RFFT, fft_lengths)
      n = x.shape[-1]
      is_odd = fft_lengths[-1] % 2
      full = partial(lax.full_like, t, dtype=x.dtype)
      mask = lax.concatenate(
          [
              full(1.0, shape=(1,)),
              full(2.0, shape=(n - 2 + is_odd,)),
              full(1.0, shape=(1 - is_odd,)),
          ],
          dimension=0,
      )
      scale = 1 / math.prod(fft_lengths)
      out = scale * lax.expand_dims(mask, range(x.ndim - 1)) * x
      assert out.dtype == _complex_dtype(t.dtype), (out.dtype, t.dtype)
      # Use JAX's convention for complex gradients
      # https://github.com/google/jax/issues/6223#issuecomment-807740707
      return lax.conj(out)
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from functools import partial
  import math
  import numpy
  from jax import lax
  from jax._src import dispatch
  from jax._src.api import jit, linear_transpose, ShapeDtypeStruct
  from jax._src.core import Primitive, is_constant_shape
  from jax._src.interpreters import ad
  from jax._src.interpreters import batching
  from jax._src.interpreters import mlir
  from jax._src.lib.mlir.dialects import hlo
  from jax._src.lib import xla_client
  from jax._src.lib import xla_extension_version
  from jax._src.lib import ducc_fft
  from jax._src.numpy.util import promote_dtypes_complex, promote_dtypes_inexact
label_desc: Use image node_id 9 for calling a global function with example usage: _irfft_transpose(t, fft_lengths) and returns: lax