code: 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
      )
  
imports: from typing import Any, Collection, List, Optional, Tuple, Union, Iterable, Sequence
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_transform import analyzer_nodes
  from tensorflow_transform import analyzers
  from tensorflow_transform import common
  from tensorflow_transform import common_types
  from tensorflow_transform import nodes
  from tensorflow_transform import tf_utils
  from tfx_bsl import sketches
  from tfx_bsl.types import tfx_namedtuple
  from typing_extensions import Protocol
label_desc: Use image node_id 3 for calling a global function with example usage: _get_approx_vocab_filename(vocab_filename, store_frequency) and returns: analyzers