def _get_approx_vocab_filename(vocab_filename: Optional[str],
                               store_frequency: bool) -> str:
  """Returns a sanitized vocabulary filename with appropriate prefix applied.

  Args:
    vocab_filename: The file name for the approximate vocabulary file. If None,
      the "approximate_vocabulary" scope name in the context of this graph will
      be used as the file name.
    store_frequency: A bool that is true when the vocabulary for which this
      generates a filename stores term frequency. False otherwise.

  Returns:
    A valid filename.
  """
  if vocab_filename is not None:
    prefix = None
  elif store_frequency:
    prefix = _APPROXIMATE_VOCAB_FILENAME_PREFIX
  else:
    prefix = _APPROXIMATE_VOCAB_FREQUENCY_FILENAME_PREFIX

  # Make the file name path safe.
  return analyzers.sanitized_vocab_filename(vocab_filename, prefix=prefix)
Returns a sanitized vocabulary filename with appropriate prefix applied.

  Args:
    vocab_filename: The file name for the approximate vocabulary file. If None,
      the "approximate_vocabulary" scope name in the context of this graph will
      be used as the file name.
    store_frequency: A bool that is true when the vocabulary for which this
      generates a filename stores term frequency. False otherwise.

  Returns:
    A valid filename.
  
tensorflow_transform/experimental/analyzers.py