class_docstr: Generates statistics for number unique and top-k item counts.
  
  Uses mergeable K-Minimum Values (KMV) and Misra-Gries sketches to estimate
  statistics.
class_docstr_tok: ["Generates","statistics","for","number","unique","and","top-k","item","counts",".","Uses","mergeable","K-Minimum","Values","(","KMV",")","and","Misra-Gries","sketches","to","estimate","statistics","."]
code: def _should_run(
      self,
      feature_path: tfdv_types.FeaturePath,
      feature_type: Optional[int],
  ) -> bool:
      # Only compute top-k and unique stats for categorical numeric and string
      # features (excluding string features declared as bytes and features that
      # indicates as non categorical under StringDomain).
      if feature_type == statistics_pb2.FeatureNameStatistics.STRING:
          return (
              feature_path not in self._bytes_features
              and self._byte_feature_is_categorical_values.get(
                  feature_path, 0
              )
              != schema_pb2.StringDomain.Categorical.CATEGORICAL_NO
          )
      return top_k_uniques_stats_util.output_categorical_numeric(
          self._categorical_numeric_types, feature_path, feature_type
      )
  
imports: import collections
  from typing import Dict, Iterable, Optional, Text
  import apache_beam
  import numpy
  import pyarrow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.arrow import arrow_util
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import schema_util
  from tensorflow_data_validation.utils import stats_util
  from tensorflow_data_validation.utils import top_k_uniques_stats_util
  from tensorflow_data_validation.utils.example_weight_map import ExampleWeightMap
  from tfx_bsl.arrow import array_util
  from tfx_bsl.sketches import KmvSketch
  from tfx_bsl.sketches import MisraGriesSketch
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 4 for calling the TopKUniquesSketchStatsGenerator obj's underlying member method code with example usage: obj._should_run(feature_path, feature_type) and returns: top_k_uniques_stats_util, unknown