docstr: Tests writing all the variants that are 'canned' in our tfrecord file.
docstr_tok: ["Tests","writing","all","the","variants","that","are","'canned","'","in","our","tfrecord","file","."]
code: def test_writing_canned_records(self):
      """Tests writing all the variants that are 'canned' in our tfrecord file."""
      # This file is in TFRecord format.
      tfrecord_file = test_utils.genomics_core_testdata(
          "test_reads.fastq.tfrecord"
      )
  
      writer_options = fastq_pb2.FastqWriterOptions()
      fastq_records = list(
          tfrecord.read_tfrecords(
              tfrecord_file, proto=fastq_pb2.FastqRecord
          )
      )
      out_fname = test_utils.test_tmpfile("output.fastq")
      with fastq_writer.FastqWriter.to_file(
          out_fname, writer_options
      ) as writer:
          for record in fastq_records:
              writer.write(record)
  
      with epath.Path(out_fname).open("r") as f:
          self.assertEqual(f.readlines(), self.expected_fastq_content)
  
file_path: deepvariant/third_party/nucleus/io/python/fastq_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 etils import epath
  from third_party.nucleus.io import fastq
  from third_party.nucleus.io import tfrecord
  from third_party.nucleus.io.python import fastq_writer
  from third_party.nucleus.protos import fastq_pb2
  from third_party.nucleus.testing import test_utils
label_desc: Use image node_id 2 for calling the WrapFastqWriterTest obj's underlying member method code with example usage: obj.test_writing_canned_records() without return types