class_docstr: Tests for BedWriter.
class_docstr_tok: ["Tests","for","BedWriter","."]
code: def test_roundtrip_writer(self, filename):
      output_path = test_utils.test_tmpfile(filename)
      with bed.BedWriter(
          output_path, header=bed_pb2.BedHeader(num_fields=5)
      ) as writer:
          for record in self.records:
              writer.write(record)
  
      with bed.BedReader(output_path) as reader:
          v2_records = list(reader.iterate())
  
      self.assertEqual(self.records, v2_records)
  
file_path: deepvariant/third_party/nucleus/io/bed_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 bed
  from third_party.nucleus.io.python import bed_reader
  from third_party.nucleus.protos import bed_pb2
  from third_party.nucleus.testing import test_utils
label_desc: Use image node_id 2 for calling the BedWriterTests obj's underlying member method code with example usage: obj.test_roundtrip_writer(filename) without return types