code: def test_roundtrip_writer(self, bedgraph_path):
      output_path = test_utils.test_tmpfile(bedgraph_path)
      input_path = test_utils.genomics_core_testdata(bedgraph_path)
      records = []
      with bedgraph.BedGraphReader(input_path) as reader:
          records = list(reader.iterate())
  
      with bedgraph.BedGraphWriter(output_path) as writer:
          for record in records:
              writer.write(record)
  
      with bedgraph.BedGraphReader(output_path) as reader:
          v2_records = list(reader.iterate())
  
      self.assertLen(records, 4)
      self.assertEqual(records, v2_records)
  
file_path: deepvariant/third_party/nucleus/io/bedgraph_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 bedgraph
  from third_party.nucleus.protos import bedgraph_pb2
  from third_party.nucleus.testing import test_utils
label_desc: Use image node_id 2 for calling the BedGraphTests obj's underlying member method code with example usage: obj.test_roundtrip_writer(bedgraph_path) without return types