def maybe_add_empty_vocabulary_dummy(
    counts: List[KV[_VocabIndicatorType,
                    _VocabTokenType]], dtype: Union[tf.dtypes.DType, str]
) -> List[KV[_VocabIndicatorType, _VocabTokenType]]:
  """Returns a list with a dummy token if counts list is empty."""
  if not counts:
    return [analyzers.get_empy_vocabulary_dummy_value(dtype)]
  else:
    return counts
Returns a list with a dummy token if counts list is empty.
tensorflow_transform/beam/analyzer_impls.py