code: def test_set_write_scopes():
      target_path = "./tests/fixtures/write_scope5.txt"
      if os.path.exists(target_path):
          os.remove(target_path)
  
      # fake write scopes, such as when called on a remote worker:
      _old_scopes = scoping.current_io_scopes()
      scoping.set_io_scopes(["./tests", "fixtures"])
  
      write("test", "write_scope5.txt", mode="w")
  
      assert os.path.isfile(target_path)
  
      # restore write scopes for later tests
      scoping.set_io_scopes(_old_scopes)
  
file_path: lucid/tests/misc/io/test_writing.py
imports: from __future__ import absolute_import, division, print_function
  import pytest
  from lucid.misc.io.writing import write, write_handle
  from lucid.misc.io.scoping import io_scope
  import lucid.misc.io.scoping
  import os
  import io
label_desc: Use image node_id 7 for calling a global function with example usage: test_set_write_scopes() without return types