def _get_type_feature_stats(stats, type_):
  """Returns stats of features that have a specified type.

  Args:
    stats: A DatasetFeatureStatistics proto
    type_: A FeatureNameStatistics.Type value

  Returns:
    A list of FeatureNameStatistics for features that have the specified type.
  """
  return [f for f in stats.features if f.type == type_]