code: def test_extract_graph_data_from_dataset_feature_statistics(self):
      empty_numeric_feature_stats = text_format.Parse(
          """
          path {
            step: "numeric_feature"
          }
          type: INT
          num_stats {
          }""",
          statistics_pb2.FeatureNameStatistics(),
      )
      self.assertIsNone(
          tf_graphics._extract_graph_data_from_dataset_feature_statistics(
              empty_numeric_feature_stats
          )
      )
  
      numeric_feature_stats = text_format.Parse(
          """
          path {
            step: "numeric_feature"
          }
          type: INT
          num_stats {
            histograms {
              buckets {
                low_value: 0.0
                high_value: 50.0
                sample_count: 6.0
              }
              buckets {
                low_value: 50.0
                high_value: 100.0
                sample_count: 4.0
              }
            }
          }""",
          statistics_pb2.FeatureNameStatistics(),
      )
      self.assertGraphEqual(
          tf_graphics._extract_graph_data_from_dataset_feature_statistics(
              numeric_feature_stats
          ),
          graphics.Graph(
              x=[6, 4],
              y=["0.00-50.00", "50.00-100.00"],
              xlabel="counts",
              ylabel="buckets",
              title="counts | numeric_feature",
              name="counts | numeric_feature",
          ),
      )
  
      string_feature_stats = text_format.Parse(
          """
          path {
            step: "string_feature"
          }
          type: STRING
          string_stats {
            rank_histogram {
              buckets {
                label: 'News'
                sample_count: 1387.0
              }
              buckets {
                label: 'Tech'
                sample_count: 3395.0
              }
              buckets {
                label: 'Sports'
                sample_count: 2395.0
              }
            }
          }""",
          statistics_pb2.FeatureNameStatistics(),
      )
      self.assertGraphEqual(
          tf_graphics._extract_graph_data_from_dataset_feature_statistics(
              string_feature_stats
          ),
          graphics.Graph(
              x=[1387, 3395, 2395],
              y=["News", "Tech", "Sports"],
              xlabel="counts",
              ylabel="buckets",
              title="counts | string_feature",
              name="counts | string_feature",
          ),
      )
  
      bytes_feature_stats = text_format.Parse(
          """
          path {
            step: "bytes_feature"
          }
          type: BYTES
          bytes_stats {}""",
          statistics_pb2.FeatureNameStatistics(),
      )
      self.assertIsNone(
          tf_graphics._extract_graph_data_from_dataset_feature_statistics(
              bytes_feature_stats
          )
      )
  
      struct_feature_stats = text_format.Parse(
          """
          path {
            step: "struct_feature"
          }
          type: STRUCT
          struct_stats {}""",
          statistics_pb2.FeatureNameStatistics(),
      )
      self.assertIsNone(
          tf_graphics._extract_graph_data_from_dataset_feature_statistics(
              struct_feature_stats
          )
      )
  
file_path: model-card-toolkit/model_card_toolkit/utils/tf_graphics_test.py
imports: import logging
  import tensorflow_model_analysis
  from absl.testing import absltest
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import statistics_pb2
  from model_card_toolkit import model_card
  from model_card_toolkit.utils import graphics, tf_graphics
label_desc: Use image node_id 2 for calling the TfGraphicsTest obj's underlying member method code with example usage: obj.test_extract_graph_data_from_dataset_feature_statistics() without return types