code: def _fft_lowering(ctx, x, *, fft_type, fft_lengths):
      if not is_constant_shape(fft_lengths):
          # TODO: https://github.com/openxla/stablehlo/issues/1366
          raise NotImplementedError(
              "Shape polymorphism for FFT with non-constant fft_length is not implemented for TPU and GPU"
          )
      return [
          hlo.FftOp(
              x,
              hlo.FftTypeAttr.get(fft_type.name),
              mlir.dense_int_array(fft_lengths),
          ).result
      ]
  
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 5 for calling a global function with example usage: _fft_lowering(ctx, x) and returns: list