code: def _linear_indices_and_weights(
      coordinate: Array,
  ) -> list[tuple[Array, ArrayLike]]:
      lower = jnp.floor(coordinate)
      upper_weight = coordinate - lower
      lower_weight = 1 - upper_weight
      index = lower.astype(jnp.int32)
      return [(index, lower_weight), (index + 1, upper_weight)]
  
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 7 for calling a global function with example usage: _linear_indices_and_weights(coordinate) and returns: list