code: def test_floor_log2():
      assert floor_log2(2**9 + 1) == 9
      assert floor_log2(-(2**9) + 1) == 8
      assert floor_log2(2) == 1
      assert floor_log2(1) == 0
      assert floor_log2(0.5) == -1
      assert floor_log2(0.75) == -1
      assert floor_log2(0.25) == -2
      assert floor_log2(0.24) == -3
      assert floor_log2(0) is None
  
file_path: nibabel/nibabel/tests/test_casting.py
imports: import os
  from platform import machine
  import numpy
  import pytest
  from numpy.testing import assert_array_equal
  from ..casting import CastingError, able_int_type, best_float, float_to_int, floor_log2, int_abs, longdouble_precision_improved, sctypes, shared_range, ulp
  from ..testing import suppress_warnings
label_desc: Use image node_id 5 for calling a global function with example usage: test_floor_log2() without return types