code: def _get_natural_language_statistics(
      statistics: statistics_pb2.DatasetFeatureStatisticsList,
  ) -> Dict[str, Dict[str, statistics_pb2.NaturalLanguageStatistics]]:
      """Gets the Natural Language stat out of the custom statistic."""
      result = {}
      for dataset in statistics.datasets:
          if not dataset.name:
              continue
          features_dict = {}
          for feature in dataset.features:
              for custom_stats in feature.custom_stats:
                  if custom_stats.name == _NL_CUSTOM_STATS_NAME:
                      nlp_stat = (
                          statistics_pb2.NaturalLanguageStatistics()
                      )
                      custom_stats.any.Unpack(nlp_stat)
                      if feature.name:
                          feature_name = feature.name
                      else:
                          feature_name = str(
                              types.FeaturePath.from_proto(feature.path)
                          )
                      features_dict[feature_name] = nlp_stat
          if features_dict:
              result[dataset.name] = features_dict
      return result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import base64
  import collections
  import sys
  from typing import Dict, Iterable, List, Optional, Text, Tuple, Union
  import pandas
  from tensorflow_data_validation import types
  from tensorflow_data_validation.skew.protos import feature_skew_results_pb2
  from tensorflow_data_validation.utils import stats_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 a global function with example usage: _get_natural_language_statistics(statistics) and returns: result