docstr: Tests writing all the records that are 'canned' in our tfrecord file.
docstr_tok: ["Tests","writing","all","the","records","that","are","'canned","'","in","our","tfrecord","file","."]
code: def test_writing_canned_records(self):
      """Tests writing all the records that are 'canned' in our tfrecord file."""
      # This file is in TFRecord format.
      tfrecord_file = test_utils.genomics_core_testdata(
          "test_features.gff.tfrecord"
      )
      writer_options = gff_pb2.GffWriterOptions()
      gff_records = list(
          tfrecord.read_tfrecords(
              tfrecord_file, proto=gff_pb2.GffRecord
          )
      )
      out_fname = test_utils.test_tmpfile("output.gff")
      with gff_writer.GffWriter.to_file(
          out_fname, self.header, writer_options
      ) as writer:
          for record in gff_records:
              writer.write(record)
  
      with open(out_fname) as f:
          self.assertEqual(f.readlines(), self.expected_gff_content)
  
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 2 for calling the WrapGffWriterTest obj's underlying member method code with example usage: obj.test_writing_canned_records() without return types