class_docstr: Size estimator.
code: def __init__(
      self, size_threshold: int, size_fn: Callable[[Any], int]
  ):
      self._size_threshold = size_threshold
      self._curr_size = 0
      self._size_fn = size_fn
      # Metrics
      self._unamortized_size = beam.metrics.Metrics.distribution(
          constants.METRICS_NAMESPACE, "size_estimator_unamortized_size"
      )
      self._refcount = beam.metrics.Metrics.distribution(
          constants.METRICS_NAMESPACE, "size_estimator_refcount"
      )
      self._amortized_size = beam.metrics.Metrics.distribution(
          constants.METRICS_NAMESPACE, "size_estimator_amortized_size"
      )
  
file_path: model-analysis/tensorflow_model_analysis/utils/size_estimator.py
imports: import sys
  from typing import Any, Callable
  import apache_beam
  from tensorflow_model_analysis import constants
label_desc: Use image node_id 1 to create a new SizeEstimator object  with example: obj = SizeEstimator(size_threshold, size_fn)