class_docstr: Computes the statistics for features of image format.
docstr: Initializes an image statistics generator.
  
  Args:
    image_decoder: ImageDecoderInterface instance for fetching image metadata.
    name: The unique name associated with this statistics generator.
    is_image_ratio_threshold: In order for a feature to be considered "image"
      type and respective stats to be generated, at least this ratio of values
      should be supported images.
    values_threshold: In order for a feature to be considered "image" type
      and respective stats to be generated, at least so many values should be
      considered.
    enable_size_stats: If True statistics about image sizes are generated.
      This currently requires decoding through TF that could have performance
      implications.
code: def __init__(
      self,
      image_decoder: Optional[ImageDecoderInterface] = None,
      name: Text = "ImageStatsGenerator",
      is_image_ratio_threshold: float = _IS_IMAGE_RATIO,
      values_threshold: int = _VALUES_THRESHOLD,
      enable_size_stats: bool = False,
  ):
      """Initializes an image statistics generator.
  
      Args:
        image_decoder: ImageDecoderInterface instance for fetching image metadata.
        name: The unique name associated with this statistics generator.
        is_image_ratio_threshold: In order for a feature to be considered "image"
          type and respective stats to be generated, at least this ratio of values
          should be supported images.
        values_threshold: In order for a feature to be considered "image" type
          and respective stats to be generated, at least so many values should be
          considered.
        enable_size_stats: If True statistics about image sizes are generated.
          This currently requires decoding through TF that could have performance
          implications.
      """
      super(ImageStatsGenerator, self).__init__(name)
      if image_decoder is None:
          image_decoder = TfImageDecoder()
      self._image_decoder = image_decoder
      self._is_image_ratio_threshold = is_image_ratio_threshold
      self._values_threshold = values_threshold
      self._enable_size_stats = enable_size_stats
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  import collections
  from typing import Iterable, List, Optional, Text
  import numpy
  import pandas
  import pyarrow
  import six
  import tensorflow
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import stats_util
  from tfx_bsl.arrow import array_util
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 to create a new ImageStatsGenerator object from inherited base classes: stats_generator with example: obj = ImageStatsGenerator(image_decoder, name, is_image_ratio_threshold, values_threshold, enable_size_stats)