code: def patch_fsync():
      mock_fsync = mock.patch("os.fsync")
      mock_fsync.start()
      yield
      mock_fsync.stop()
  
imports: import os
  from unittest import mock
  import pytest
label_desc: Use image node_id 2 for calling a global function with example usage: patch_fsync() without return types