def get_empy_vocabulary_dummy_value(
    dtype: Union[tf.dtypes.DType, str]) -> Tuple[int, bytes]:
  """Returns a vocabulary entry to use in case of an empty vocabulary."""
  # TODO(b/62272023) remove this workaround if/when fixed on tensorflow.
  # If the vocabulary is empty add a dummy value with count one so
  # the tensorflow index operations don't fail to initialize with empty
  # tensors downstream.
  dummy_value = (b'49d0cd50-04bb-48c0-bc6f-5b575dce351a'
                 if tf.dtypes.as_dtype(dtype) == tf.string else b'-1')
  return (1, dummy_value)
Returns a vocabulary entry to use in case of an empty vocabulary.
tensorflow_transform/analyzers.py