docstr: Tests GitHub issue #4.
docstr_tok: ["Tests","GitHub","issue","#","4","."]
code: def test_write_iteration_report_encoding(self):
      """Tests GitHub issue #4."""
  
      report_accessor = _ReportAccessor(self.get_temp_dir())
      binary_type_value = (
          b"\n\x83\x01\n;adanet/iteration_2/ensemble_2_layer_dnn/"
      )
      text_type_value = "\U0001f937"
      materialized_reports = [
          subnetwork.MaterializedReport(
              iteration_number=0,
              name="foo",
              hparams={
                  "p1": binary_type_value,
                  "p2": text_type_value,
              },
              attributes={
                  "a1": binary_type_value,
                  "a2": text_type_value,
              },
              metrics={
                  "m1": binary_type_value,
                  "m2": text_type_value,
              },
              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)
  
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 4 for calling the ReportAccessorTest obj's underlying member method code with example usage: obj.test_write_iteration_report_encoding() without return types