code: def append_foo_script(tmp_dir):
      return _add_script(
          tmp_dir,
          "append_foo.py",
          """
  import sys
  from pathlib import Path
  
  with Path(sys.argv[1]).open("a+", encoding="utf-8") as f:
      f.write("foo")
  """.replace(
              "\r\n", "\n"
          ),
      )
  
label_desc: Use image node_id 1 for calling a global function with example usage: append_foo_script(tmp_dir) and returns: _add_script