code: def test_add_to_empty_file(self):
      report_accessor = _ReportAccessor(self.get_temp_dir())
      materialized_reports = [
          subnetwork.MaterializedReport(
              iteration_number=0,
              name="foo",
              hparams={
                  "p1": 1,
                  "p2": "default_hparam",
                  "p3": b"binary_hparam",
                  "p4": "unicode_hparam",
                  "p5": True,
              },
              attributes={
                  "a1": 1,
                  "a2": "default_attribute",
                  "a3": b"binary_attribute",
                  "a4": "unicode_attribute",
                  "a5": True,
              },
              metrics={
                  "m1": 1,
                  "m2": "default_metric",
                  "m3": b"binary_metric",
                  "m4": "unicode_metric",
                  "m5": True,
              },
              included_in_final_ensemble=True,
          ),
      ]
  
      report_accessor.write_iteration_report(
          iteration_number=0,
          materialized_reports=materialized_reports,
      )
      actual_iteration_reports = list(
          report_accessor.read_iteration_reports()
      )
  
      self.assertLen(actual_iteration_reports, 1)
      self.assertEqual(
          materialized_reports, actual_iteration_reports[0]
      )
  
file_path: adanet/adanet/core/report_accessor_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  from adanet import subnetwork
  from adanet.core.report_accessor import _ReportAccessor
  import tensorflow.compat.v2
label_desc: Use image node_id 2 for calling the ReportAccessorTest obj's underlying member method code with example usage: obj.test_add_to_empty_file() without return types