class_docstr: Generates feature-level statistics for features in the Time domain.
  
  This generates Time domain stats for input examples. After the statistics are
  combined, it classifies the feature as being in the Time domain iff the
  statistics represent enough values (self._values_threshold) and the match
  ratio is high enough (self._match_ratio). The match ratio is determined by
  comparing the most common matching format to the total number of values
  considered.
class_docstr_tok: ["Generates","feature-level","statistics","for","features","in","the","Time","domain",".","This","generates","Time","domain","stats","for","input","examples",".","After","the","statistics","are","combined",",","it","classifies","the","feature","as","being","in","the","Time","domain","iff","the","statistics","represent","enough","values","(","self._values_threshold",")","and","the","match","ratio","is","high","enough","(","self._match_ratio",")",".","The","match","ratio","is","determined","by","comparing","the","most","common","matching","format","to","the","total","number","of","values","considered","."]
docstr: Returns the result of converting accumulator into the output value.
  
  This method will add the time_domain custom stat to the proto if the match
  ratio is at least self._match_ratio. The match ratio is determined by
  dividing the number of values that have the most common valid format by the
  total number of values considered. If this method adds the time_domain
  custom stat, it also adds the match ratio and the most common valid format
  to the proto as custom stats.
  
  Args:
    accumulator: The final accumulator value.
  
  Returns:
    A proto representing the result of this stats generator.
docstr_tok: ["Returns","the","result","of","converting","accumulator","into","the","output","value",".","This","method","will","add","the","time_domain","custom","stat","to","the","proto","if","the","match","ratio","is","at","least","self._match_ratio",".","The","match","ratio","is","determined","by","dividing","the","number","of","values","that","have","the","most","common","valid","format","by","the","total","number","of","values","considered",".","If","this","method","adds","the","time_domain","custom","stat",",","it","also","adds","the","match","ratio","and","the","most","common","valid","format","to","the","proto","as","custom","stats",".","Args",":","accumulator",":","The","final","accumulator","value",".","Returns",":","A","proto","representing","the","result","of","this","stats","generator","."]
code: def extract_output(
      self, accumulator: _PartialTimeStats
  ) -> statistics_pb2.FeatureNameStatistics:
      """Returns the result of converting accumulator into the output value.
  
      This method will add the time_domain custom stat to the proto if the match
      ratio is at least self._match_ratio. The match ratio is determined by
      dividing the number of values that have the most common valid format by the
      total number of values considered. If this method adds the time_domain
      custom stat, it also adds the match ratio and the most common valid format
      to the proto as custom stats.
  
      Args:
        accumulator: The final accumulator value.
  
      Returns:
        A proto representing the result of this stats generator.
      """
      result = statistics_pb2.FeatureNameStatistics()
      if (
          accumulator.invalidated
          or accumulator.considered < self._values_threshold
          or not accumulator.matching_formats
      ):
          return result
  
      (
          most_common_format,
          most_common_count,
      ) = accumulator.matching_formats.most_common(1)[0]
      assert most_common_count > 0
      match_ratio = most_common_count / accumulator.considered
      if match_ratio >= self._match_ratio:
          if most_common_format in _UNIX_TIME_FORMATS:
              result.custom_stats.add(
                  name=stats_util.DOMAIN_INFO,
                  str="time_domain {integer_format: %s}"
                  % most_common_format,
              )
          else:
              result.custom_stats.add(
                  name=stats_util.DOMAIN_INFO,
                  str="time_domain {string_format: '%s'}"
                  % most_common_format,
              )
          result.custom_stats.add(
              name=_TIME_MATCH_RATIO, num=match_ratio
          )
      return result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import calendar
  import collections
  import re
  import numpy
  import pyarrow
  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 typing import Iterable, Pattern, Text, Tuple
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 5 for calling the TimeStatsGenerator obj's underlying member method code with example usage: obj.extract_output(accumulator) and returns: result, result