code: def read_stats_protos_and_filter_features(
      stats_artifact_uri: str,
      features_include: Optional[Sequence[str]] = None,
      features_exclude: Optional[List[str]] = None,
  ) -> List[statistics_pb2.DatasetFeatureStatisticsList]:
      """Reads DatasetFeatureStatisticsList protos and filters features.
  
      Args:
        stats_artifact_uri: the output artifact path of a StatsGen component.
        features_include: The names or paths of features to keep. Mutually exclusive
          with features_exclude.
        features_exclude: The names or paths of features to discard. Mutually
          exclusive with features_include.
  
      Returns:
        A list of DatasetFeatureStatisticsList from the provided path, with unwanted
          features filtered.
  
      Raises:
        ValueError: if both or neither of features_include and features_exclude are
          provided.
      """
      data_stats = read_stats_protos(stats_artifact_uri)
      for dsfl in data_stats:
          filtered_datasets = [
              filter_features(
                  dataset, features_include, features_exclude
              )
              for dataset in dsfl.datasets
          ]
          del dsfl.datasets[:]
          dsfl.datasets.extend(filtered_datasets)
      return data_stats
  
imports: import enum
  import os
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Union
  import attr
  import ml_metadata
  import tensorflow
  import tensorflow_model_analysis
  from absl import logging
  from ml_metadata.proto import metadata_store_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
  from model_card_toolkit import model_card
label_desc: Use image node_id 15 for calling a global function with example usage: read_stats_protos_and_filter_features(stats_artifact_uri, features_include, features_exclude) and returns: data_stats