code: def _get_csv_test(self, delimiter=",", with_header=False):
      fields = [
          ["feature1", "feature2"],
          ["1.0", "aa"],
          ["2.0", "bb"],
          ["3.0", "cc"],
          ["4.0", "dd"],
          ["5.0", "ee"],
          ["6.0", "ff"],
          ["7.0", "gg"],
          ["", ""],
      ]
      records = []
      for row in fields:
          records.append(delimiter.join(row))
  
      expected_result = text_format.Parse(
          """
      datasets {
    num_examples: 8
    features {
      path {
        step: "feature1"
      }
      type: FLOAT
      num_stats {
        common_stats {
          num_non_missing: 7
          num_missing: 1
          min_num_values: 1
          max_num_values: 1
          avg_num_values: 1.0
          tot_num_values: 7
        }
        mean: 4.0
        std_dev: 2.0
        min: 1.0
        max: 7.0
        median: 4.0
      }
    }
    features {
      path {
        step: "feature2"
      }
      type: STRING
      string_stats {
        common_stats {
          num_non_missing: 7
          num_missing: 1
          min_num_values: 1
          max_num_values: 1
          avg_num_values: 1.0
          tot_num_values: 7
        }
        unique: 7
        top_values {
          value: "gg"
          frequency: 1.0
        }
        top_values {
          value: "ff"
          frequency: 1.0
        }
        avg_length: 2.0
        rank_histogram {
          buckets {
            label: "gg"
            sample_count: 1.0
          }
          buckets {
            low_rank: 1
            high_rank: 1
            label: "ff"
            sample_count: 1.0
          }
        }
      }
    }
      }
      """,
          statistics_pb2.DatasetFeatureStatisticsList(),
      )
  
      if with_header:
          return (records, None, expected_result)
      return (records[1:], records[0].split(delimiter), expected_result)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import gzip
  import os
  import tempfile
  from absl.testing import absltest
  from absl.testing import parameterized
  from apache_beam.io.filesystem import CompressionTypes
  import pandas
  import tensorflow
  from tensorflow_data_validation.statistics import stats_options
  from tensorflow_data_validation.utils import stats_gen_lib
  from tensorflow_data_validation.utils import test_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 7 for calling the StatsGenTest obj's underlying member method code with example usage: obj._get_csv_test(delimiter, with_header) and returns: records,  records,  expected_result, records,  None,  expected_result