code: def testGetProtoStrings(self):
      # Tests converting string examples into the feature stats proto
      examples = []
      for i in range(2):
          example = tf.train.Example()
          example.features.feature["str"].bytes_list.value.append(
              b"hello"
          )
          examples.append(example)
      for i in range(3):
          example = tf.train.Example()
          example.features.feature["str"].bytes_list.value.append(b"hi")
          examples.append(example)
      example = tf.train.Example()
      example.features.feature["str"].bytes_list.value.append(b"hey")
      examples.append(example)
  
      entries = {}
      for i, example in enumerate(examples):
          self.fs._ParseExample(
              example.features.feature, [], entries, i
          )
  
      datasets = [
          {"entries": entries, "size": len(examples), "name": "test"}
      ]
      p = self.fs.GetDatasetsProto(datasets)
  
      self.assertEqual(1, len(p.datasets))
      test_data = p.datasets[0]
      self.assertEqual("test", test_data.name)
      self.assertEqual(6, test_data.num_examples)
  
      strfeat = test_data.features[0]
      self.assertEqual("str", strfeat.name)
      self.assertEqual(self.fs.fs_proto.STRING, strfeat.type)
      self.assertEqual(3, strfeat.string_stats.unique)
      self.assertAlmostEqual(
          19 / 6.0, strfeat.string_stats.avg_length, 4
      )
      self.assertEqual(0, strfeat.string_stats.common_stats.num_missing)
      self.assertEqual(
          6, strfeat.string_stats.common_stats.num_non_missing
      )
      self.assertEqual(
          1, strfeat.string_stats.common_stats.min_num_values
      )
      self.assertEqual(
          1, strfeat.string_stats.common_stats.max_num_values
      )
      self.assertEqual(
          1, strfeat.string_stats.common_stats.avg_num_values
      )
      hist = strfeat.string_stats.common_stats.num_values_histogram
      buckets = hist.buckets
      self.assertEqual(self.fs.histogram_proto.QUANTILES, hist.type)
      self.assertEqual(10, len(buckets))
      self.assertEqual(1, buckets[0].low_value)
      self.assertEqual(1, buckets[0].high_value)
      self.assertEqual(0.6, buckets[0].sample_count)
      self.assertEqual(1, buckets[9].low_value)
      self.assertEqual(1, buckets[9].high_value)
      self.assertEqual(0.6, buckets[9].sample_count)
  
      self.assertEqual(2, len(strfeat.string_stats.top_values))
      self.assertEqual(3, strfeat.string_stats.top_values[0].frequency)
      self.assertEqual("hi", strfeat.string_stats.top_values[0].value)
      self.assertEqual(2, strfeat.string_stats.top_values[1].frequency)
      self.assertEqual(
          "hello", strfeat.string_stats.top_values[1].value
      )
  
      buckets = strfeat.string_stats.rank_histogram.buckets
      self.assertEqual(3, len(buckets))
      self.assertEqual(0, buckets[0].low_rank)
      self.assertEqual(0, buckets[0].high_rank)
      self.assertEqual(3, buckets[0].sample_count)
      self.assertEqual("hi", buckets[0].label)
      self.assertEqual(2, buckets[2].low_rank)
      self.assertEqual(2, buckets[2].high_rank)
      self.assertEqual(1, buckets[2].sample_count)
      self.assertEqual("hey", buckets[2].label)
  
imports: from facets_overview.feature_statistics_generator import FeatureStatisticsGenerator
  import numpy
  import tensorflow
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 17 for calling the FeatureStatisticsGeneratorTest obj's underlying member method code with example usage: obj.testGetProtoStrings() without return types