code: def _verify_output_dir(
      output_dir: Optional[str], overwrite: bool
  ) -> None:
      """Verifies the output directory.
  
      Raises an error if `output_dir` is not suitable for writing the output saved
      model.
  
      Args:
        output_dir: Output directory.
        overwrite: An option allowing to overwrite the existing output directory if
          set to true. Does not actually create or modify the `output_dir` in this
          function.
  
      Raises:
        FileExistsError: Iff `output_dir` is not empty and `overwrite` is false.
      """
      dir_not_empty = (
          output_dir is not None
          and file_io.file_exists_v2(output_dir)
          and file_io.list_directory_v2(output_dir)
      )
  
      if dir_not_empty and not overwrite:
          raise FileExistsError(
              f"Output directory already exists: {output_dir} . "
              "Please set overwrite_output_directory to true to "
              "overwrite the existing directory."
          )
  
imports: import tempfile
  from typing import Mapping, Optional
  from absl import logging
  from tensorflow.compiler.mlir.quantization.tensorflow import quantization_options_pb2
  from tensorflow.compiler.mlir.quantization.tensorflow.python import py_function_lib
  from tensorflow.compiler.mlir.quantization.tensorflow.python import pywrap_quantize_model
  from tensorflow.compiler.mlir.quantization.tensorflow.python import representative_dataset
  from tensorflow.compiler.mlir.quantization.tensorflow.python import save_model
  from tensorflow.core.protobuf import meta_graph_pb2
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import loader_impl
  from tensorflow.python.saved_model import signature_constants
  from tensorflow.python.saved_model import tag_constants
  from tensorflow.python.trackable import autotrackable
  from tensorflow.python.util import tf_export
label_desc: Use image node_id 8 for calling a global function with example usage: _verify_output_dir(output_dir, overwrite) without return types