code: def _mirror_index_fixer(index: Array, size: int) -> Array:
      s = size - 1  # Half-wavelength of triangular wave
      # Scaled, integer-valued version of the triangular wave |x - round(x)|
      return jnp.abs((index + s) % (2 * s) - s)
  
imports: from collections.abc import Sequence
  import functools
  import itertools
  import operator
  import textwrap
  from typing import Callable
  import scipy.ndimage
  from jax._src import api
  from jax._src import util
  from jax import lax
  import jax.numpy
  from jax._src.numpy.util import _wraps
  from jax._src.typing import ArrayLike, Array
  from jax._src.util import safe_zip
label_desc: Use image node_id 3 for calling a global function with example usage: _mirror_index_fixer(index, size) and returns: jnp