code: def test_annotate_dataset_feature_statistics_plots(self):
      train_stats = text_format.Parse(
          """
      datasets {
        features {
          path {
            step: "LDA_00"
          }
          type: FLOAT
          num_stats {
            histograms {
              buckets {
                low_value: 0.0
                high_value: 100.0
                sample_count: 10.0
              }
            }
            histograms {
              buckets {
                low_value: 0.0
                high_value: 50.0
                sample_count: 4.0
              }
              buckets {
                low_value: 50.0
                high_value: 100.0
                sample_count: 4.0
              }
              type: QUANTILES
            }
          }
        }
        features {
          path {
            step: "LDA_01"
          }
          type: FLOAT
          num_stats {
            histograms {
              buckets {
                low_value: 0.0
                high_value: 100.0
                sample_count: 10.0
              }
            }
            histograms {
              buckets {
                low_value: 0.0
                high_value: 50.0
                sample_count: 4.0
              }
              buckets {
                low_value: 50.0
                high_value: 100.0
                sample_count: 4.0
              }
              type: QUANTILES
            }
          }
        }
        features {
          path {
            step: "LDA_02"
          }
          type: FLOAT
          num_stats {
            histograms {
              buckets {
                low_value: 0.0
                high_value: 100.0
                sample_count: 10.0
              }
            }
            histograms {
              buckets {
                low_value: 0.0
                high_value: 50.0
                sample_count: 4.0
              }
              buckets {
                low_value: 50.0
                high_value: 100.0
                sample_count: 4.0
              }
              type: QUANTILES
            }
          }
        }
        features {
          path {
            step: "LDA_03"
          }
          type: STRING
          bytes_stats {
            unique: 1
          }
        }
      }
      """,
          statistics_pb2.DatasetFeatureStatisticsList(),
      )
      eval_stats = text_format.Parse(
          """
      datasets {
        features {
          path {
            step: "data_channel"
          }
          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
              }
            }
          }
        }
        features {
          path {
            step: "date"
          }
          type: STRING
          string_stats {
            rank_histogram {
              buckets {
                label: '2014-12-10'
                sample_count: 40.0
              }
              buckets {
                label: '2014-11-06'
                sample_count: 37.0
              }
            }
          }
        }
        features {
          path {
            step: "slug"
          }
          type: STRING
          string_stats {
            rank_histogram {
              buckets {
                label: 'zynga-q3-earnings'
                sample_count: 1.0
              }
              buckets {
                label: 'zumba-ad'
                sample_count: 1.0
              }
            }
          }
        }
      }
      """,
          statistics_pb2.DatasetFeatureStatisticsList(),
      )
  
      model_card = model_card_module.ModelCard()
      tf_graphics.annotate_dataset_feature_statistics_plots(
          model_card, [train_stats, eval_stats]
      )
  
      expected_plot_names_train = {
          "counts | LDA_00",
          "counts | LDA_01",
          "counts | LDA_02",
      }
      expected_plot_names_eval = {
          "counts | data_channel",
          "counts | date",
          "counts | slug",
      }
  
      self.assertLen(model_card.model_parameters.data, 2)
  
      train_data = model_card.model_parameters.data[0]
      self.assertSameElements(
          [g.name for g in train_data.graphics.collection],
          expected_plot_names_train,
      )
  
      eval_data = model_card.model_parameters.data[1]
      self.assertSameElements(
          [g.name for g in eval_data.graphics.collection],
          expected_plot_names_eval,
      )
  
      graphs = (
          train_data.graphics.collection + eval_data.graphics.collection
      )
      for graph in graphs:
          logging.info("%s: %s", graph.name, graph.image)
          self.assertNotEmpty(
              graph.image, f"feature {graph.name} has empty plot"
          )
  
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 3 for calling the TfGraphicsTest obj's underlying member method code with example usage: obj.test_annotate_dataset_feature_statistics_plots() without return types