code: def test_get_natural_language_statistics_many_features_dataframes(
      self,
  ):
      statistics = text_format.Parse(
          """
      datasets {
        num_examples: 3
        features {
          name: 'feature_name'
          type: BYTES
          custom_stats {
            name: "nl_statistics"
          }
        }
        features {
          name: 'feature_name_2'
          type: BYTES
          custom_stats {
            name: "nl_statistics"
          }
        }
      }
      """,
          statistics_pb2.DatasetFeatureStatisticsList(),
      )
  
      nl_stats = text_format.Parse(
          """
          feature_coverage: 1.0
          avg_token_length: 3.6760780287474333
          token_length_histogram {
            buckets {
              low_value: 1.0
              high_value: 1.0
              sample_count: 194.8
            }
          }
          token_statistics {
            int_token: 88
          }
          token_statistics {
            string_token: "[UNK]"
          }
          token_statistics {
            string_token: "[PAD]"
            frequency: 48852.0
            fraction_of_sequences: 1.0
            per_sequence_min_frequency: 220.0
            per_sequence_avg_frequency: 244.26
            per_sequence_max_frequency: 251.0
            positions {
              buckets {
                high_value: 0.1
                sample_count: 2866.0
              }
            }
          }
          sequence_length_histogram {
            buckets {
              low_value: 5.0
              high_value: 7.0
              sample_count: 20.0
            }
          }
          min_sequence_length: 5
          max_sequence_length: 36
          """,
          statistics_pb2.NaturalLanguageStatistics(),
      )
  
      statistics.datasets[0].features[0].custom_stats[0].any.Pack(
          nl_stats
      )
      statistics.datasets[0].features[1].custom_stats[0].any.Pack(
          nl_stats
      )
      actual = display_util.get_natural_language_statistics_dataframes(
          statistics, statistics
      )
  
      token_length_histogram = pd.DataFrame.from_dict(
          {
              "high_values": [1.0],
              "low_values": [1.0],
              "sample_counts": [194.8],
          }
      )
      token_statistics = pd.DataFrame.from_dict(
          {
              "token_name": [88, "[UNK]", "[PAD]"],
              "frequency": [0.0, 0.0, 48852.0],
              "fraction_of_sequences": [0.0, 0.0, 1.0],
              "per_sequence_min_frequency": [0.0, 0.0, 220.0],
              "per_sequence_max_frequency": [0.0, 0.0, 251.0],
              "per_sequence_avg_frequency": [0.0, 0.0, 244.26],
              "positions": [
                  pd.DataFrame.from_dict(
                      {
                          "high_values": [],
                          "low_values": [],
                          "sample_counts": [],
                      }
                  ),
                  pd.DataFrame.from_dict(
                      {
                          "high_values": [],
                          "low_values": [],
                          "sample_counts": [],
                      }
                  ),
                  pd.DataFrame.from_dict(
                      {
                          "high_values": [0.1],
                          "low_values": [0.0],
                          "sample_counts": [2866.0],
                      }
                  ),
              ],
          }
      )
      expected = {
          "lhs_statistics": {
              "feature_name": {
                  "token_length_histogram": token_length_histogram,
                  "token_statistics": token_statistics,
              },
              "feature_name_2": {
                  "token_length_histogram": token_length_histogram,
                  "token_statistics": token_statistics,
              },
          },
          "rhs_statistics": {
              "feature_name": {
                  "token_length_histogram": token_length_histogram,
                  "token_statistics": token_statistics,
              },
              "feature_name_2": {
                  "token_length_histogram": token_length_histogram,
                  "token_statistics": token_statistics,
              },
          },
      }
  
      self._assert_dict_equal(expected, actual)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Any, Dict
  from absl.testing import absltest
  from absl.testing import parameterized
  from google.protobuf import text_format
  import pandas
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.skew.protos import feature_skew_results_pb2
  from tensorflow_data_validation.utils import display_util
  from tensorflow_data_validation.utils import test_util
  from tensorflow_metadata.proto.v0 import anomalies_pb2
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 14 for calling the DisplayUtilTest obj's underlying member method code with example usage: obj.test_get_natural_language_statistics_many_features_dataframes() without return types