code: def _get_cffi_func(base, signature):
      if not HAVE_CFFI:
          pytest.skip("cffi not installed")
  
      # Get function address
      voidp = ctypes.cast(base, ctypes.c_void_p)
      address = voidp.value
  
      # Create corresponding cffi handle
      ffi = cffi.FFI()
      func = ffi.cast(signature, address)
      return func
  
file_path: scipy/scipy/_lib/tests/test_ccallback.py
imports: from numpy.testing import assert_equal, assert_
  from pytest import raises
  import time
  import pytest
  import ctypes
  import threading
  from scipy._lib import _ccallback_c
  from scipy._lib import _test_ccallback
  from scipy._lib._ccallback import LowLevelCallable
label_desc: Use image node_id 2 for calling a global function with example usage: _get_cffi_func(base, signature) and returns: func