code: def _declare_synchronize():
      # Raises DeviceSynchronized if device synchronization is disallowed in
      # the current thread.
      if not _is_allowed():
          raise DeviceSynchronized()
  
file_path: cupy/cupy/_core/syncdetect.py
imports: import contextlib
  import threading
  import warnings
label_desc: Use image node_id 2 for calling a global function with example usage: _declare_synchronize() without return types