code: def test_fileslice_heuristic():
      # Just check that any of several heuristics gives the right answer
      shape = (15, 16, 17)
      arr = np.arange(np.prod(shape)).reshape(shape)
      for heuristic in (_always, _never, _partial, threshold_heuristic):
          for order in "FC":
              fobj = BytesIO()
              fobj.write(arr.tobytes(order=order))
              sliceobj = (1, slice(0, 15, 2), slice(None))
              _check_slicer(sliceobj, arr, fobj, 0, order, heuristic)
              # Check _simple_fileslice while we're at it - si como no?
              new_slice = _simple_fileslice(
                  fobj,
                  sliceobj,
                  arr.shape,
                  arr.dtype,
                  0,
                  order,
                  heuristic,
              )
              assert_array_equal(arr[sliceobj], new_slice)
  
imports: import time
  from functools import partial
  from io import BytesIO
  from itertools import product
  from threading import Lock, Thread
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ..fileslice import _positive_slice, _simple_fileslice, calc_slicedefs, canonical_slicers, fileslice, fill_slicer, is_fancy, optimize_read_slicers, optimize_slicer, predict_shape, read_segments, slice2len, slice2outax, slicers2segments, strided_scalar, threshold_heuristic
label_desc: Use image node_id 27 for calling a global function with example usage: test_fileslice_heuristic() without return types