code: def test_write_text():
      text = "The quick brown fox jumps over the lazy 🐕"
      path = "./tests/fixtures/string.txt"
  
      write(text, path, mode="w")
      content = io.open(path, "rt").read()
  
      assert os.path.isfile(path)
      assert content == text
  
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 1 for calling a global function with example usage: test_write_text() without return types