code: def assert_indexed_axes(
      arr: np.array, indexed_axes: Sequence[int]
  ) -> None:
      """
      Checks that indexed_axes fits the given array.
  
      Parameters
      ----------
      arr: np.ndarray
           A given array that we want to check indexed_axes against.
      indexed_axes: sequence
              The sequence with indices, with axes.
  
      Returns
      -------
      None
      """
      # TODO: Change for batching update, since currently single images are expected.
      assert len(indexed_axes) <= arr.ndim
      assert len(indexed_axes) == len(
          np.arange(indexed_axes[0], indexed_axes[-1] + 1)
      )
      assert all(
          [
              a == b
              for a, b in list(
                  zip(
                      indexed_axes,
                      np.arange(indexed_axes[0], indexed_axes[-1] + 1),
                  )
              )
          ]
      ), "Make sure indexed_axes contains consecutive axes."
      assert (
          0 in indexed_axes or arr.ndim - 1 in indexed_axes
      ), "Make sure indexed_axes contains either the first or last axis of arr."
  
file_path: Quantus/quantus/helpers/asserts.py
imports: from typing import Callable, Tuple, Sequence, Union
  import numpy
label_desc: Use image node_id 11 for calling a global function with example usage: assert_indexed_axes(arr, indexed_axes) without return types