code: def _maybe_filter(array, order, func, prefilter, dtype):
      array = _check_interpolate(array, order, func)
      if array.ndim < 1:
          raise ValueError(func + ": array rank must be > 0")
      if prefilter and order > 1:
          return spline_filter(array, order, dtype=dtype)
      else:
          return array.astype(dtype, copy=False)
  
file_path: mahotas/mahotas/interpolate.py
imports: import numpy
  from .None import internal
  from .None import _interpolate
  from ._filters import mode2int, modes, _check_mode
label_desc: Use image node_id 4 for calling a global function with example usage: _maybe_filter(array, order, func, prefilter, dtype) and returns: spline_filter, array