code: def _flip(arr, axes=None):
      """Reverse array over many axes. Generalization of arr[::-1] for many
      dimensions. If `axes` is `None`, flip along all axes."""
      if axes is None:
          reverse = [slice(None, None, -1)] * arr.ndim
      else:
          reverse = [slice(None, None, None)] * arr.ndim
          for axis in axes:
              reverse[axis] = slice(None, None, -1)
  
      return arr[tuple(reverse)]
  
file_path: scikit-image/skimage/registration/_masked_phase_cross_correlation.py
imports: from functools import partial
  import numpy
  import scipy.fft
  from scipy.fft import next_fast_len
  from .._shared.utils import _supported_float_type
label_desc: Use image node_id 4 for calling a global function with example usage: _flip(arr, axes) and returns: arr