code: def test_double_close(self):
      with self.writer:
          # Writing within the context manager succeeds.
          self.assertIsNone(self.writer.write(self.record))
  
      with self.assertRaisesRegexp(ValueError, _DOUBLE_CLOSE_ERROR):
          # Entering the closed writer should be fine.
          with self.writer:
              pass
  
file_path: deepvariant/third_party/nucleus/io/python/gff_writer_wrap_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import absltest
  from absl.testing import parameterized
  from third_party.nucleus.io import tfrecord
  from third_party.nucleus.io.python import gff_writer
  from third_party.nucleus.protos import gff_pb2
  from third_party.nucleus.testing import test_utils
  from third_party.nucleus.util import ranges
label_desc: Use image node_id 4 for calling the WrapGffWriterTest obj's underlying member method code with example usage: obj.test_double_close() without return types