code: def fftconvolve(
      in1: ArrayLike,
      in2: ArrayLike,
      mode: str = "full",
      axes: Sequence[int] | None = None,
  ) -> Array:
      check_arraylike("fftconvolve", in1, in2)
      in1, in2 = promote_dtypes_inexact(in1, in2)
      if in1.ndim != in2.ndim:
          raise ValueError(
              "in1 and in2 should have the same dimensionality"
          )
      if mode not in ["same", "full", "valid"]:
          raise ValueError(
              "mode must be one of ['same', 'full', 'valid']"
          )
      _fftconvolve = partial(_fftconvolve_unbatched, mode=mode)
      if axes is None:
          return _fftconvolve(in1, in2)
      axes = _ensure_index_tuple(axes)
      axes = tuple(canonicalize_axis(ax, in1.ndim) for ax in axes)
      mapped_axes = set(range(in1.ndim)) - set(axes)
      if any(in1.shape[i] != in2.shape[i] for i in mapped_axes):
          raise ValueError(
              f"mapped axes must have same shape; got {in1.shape=} {in2.shape=} {axes=}"
          )
      for ax in sorted(mapped_axes):
          _fftconvolve = jax.vmap(_fftconvolve, in_axes=ax, out_axes=ax)
      return _fftconvolve(in1, in2)
  
imports: from __future__ import annotations
  from collections.abc import Sequence
  from functools import partial
  import math
  import operator
  from typing import Callable
  import warnings
  import numpy
  import scipy.signal
  from scipy.fft import next_fast_len
  import jax
  import jax.numpy.fft
  import jax.numpy
  from jax import lax
  from jax._src.api_util import _ensure_index_tuple
  from jax._src import dtypes
  from jax._src.lax.lax import PrecisionLike
  from jax._src.numpy import linalg
  from jax._src.numpy.util import check_arraylike, _wraps, promote_dtypes_inexact, promote_dtypes_complex
  from jax._src.third_party.scipy import signal_helper
  from jax._src.typing import Array, ArrayLike
  from jax._src.util import canonicalize_axis, tuple_delete, tuple_insert
label_desc: Use image node_id 1 for calling a global function with example usage: fftconvolve(in1, in2, mode, axes) and returns: _fftconvolve, _fftconvolve