code: def test_writing(self):
      path = test_utils.test_tmpfile("test_gfile")
      with gfile.Open(path, "w") as f:
          f.write("test\n")
          f.write("end\n")
  
      with gfile.Open(path, "r") as f2:
          lines = f2.readlines()
  
      self.assertEqual(["test\n", "end\n"], lines)
  
file_path: deepvariant/third_party/nucleus/io/gfile_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import absltest
  from third_party.nucleus.io import gfile
  from third_party.nucleus.testing import test_utils
label_desc: Use image node_id 4 for calling the GfileTest obj's underlying member method code with example usage: obj.test_writing() without return types