class_docstr: Tracks statistics for individual tokens.
class_docstr_tok: ["Tracks","statistics","for","individual","tokens","."]
docstr: Merge two _TokenStats.
docstr_tok: ["Merge","two","_TokenStats","."]
code: def __iadd__(self, other: "_TokenStats") -> "_TokenStats":
      """Merge two _TokenStats."""
      self.frequency += other.frequency
      self.num_sequences += other.num_sequences
      for attr, fn in [
          ("per_sequence_min_frequency", min),
          ("per_sequence_max_frequency", max),
      ]:
          self_freq = getattr(self, attr)
          other_freq = getattr(other, attr)
          if self_freq is not None and other_freq is not None:
              setattr(self, attr, fn(self_freq, other_freq))
          elif self_freq is None:
              setattr(self, attr, other_freq)
      self.positions += other.positions
      return self
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import collections
  from typing import Dict, Iterable, List, Optional, Set, Text, Union
  import pyarrow
  import six
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.utils import quantiles_util
  from tensorflow_data_validation.utils import schema_util
  from tensorflow_data_validation.utils import stats_util
  from tensorflow_data_validation.utils import vocab_util
  from tfx_bsl import sketches
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
  from tfx_bsl.types import tfx_namedtuple
label_desc: Use image node_id 2 for calling the _TokenStats obj's underlying member method code with example usage: obj.__iadd__(other) and returns: self