code: def make_changed_prediction_indices_func(
      return_nan_when_prediction_changes: bool,
  ) -> Callable[[ModelInterface, np.ndarray, np.ndarray], List[int]]:
      """A utility function to improve static analysis."""
      return functools.partial(
          changed_prediction_indices,
          return_nan_when_prediction_changes=return_nan_when_prediction_changes,
      )
  
file_path: Quantus/quantus/helpers/perturbation_utils.py
imports: from __future__ import annotations
  import sys
  from typing import List, TYPE_CHECKING, Callable, Mapping
  import numpy
  import functools
label_desc: Use image node_id 2 for calling a global function with example usage: make_changed_prediction_indices_func(return_nan_when_prediction_changes) and returns: functools