code: def open_tablebase_native(directory: PathLike, *, libgtb: Any = None, LibraryLoader: Any = ctypes.cdll) -> NativeTablebase:
      
      libgtb = libgtb or ctypes.util.find_library("gtb") or "libgtb.so.1.0.1"
      tables = NativeTablebase(LibraryLoader.LoadLibrary(libgtb))
      tables.add_directory(directory)
      return tables
docs: Opens a collection of tables for probing using libgtb.
  
      In most cases :func:`~chess.gaviota.open_tablebase()` should be used.
      Use this function only if you do not want to downgrade to pure Python
      tablebase probing.
  
      :raises: :exc:`RuntimeError` or :exc:`OSError` when libgtb can not be used.