code: def _invoke_rewriter(
      src: str,
      dst: str,
      rewriter_inst: rewriter.BaseRewriter,
      src_model_type: rewriter.ModelType,
      dst_model_type: rewriter.ModelType,
  ):
      """Converts the provided model by invoking the specified rewriters.
  
      Args:
        src: Path to the source model.
        dst: Path where the destination model is to be written.
        rewriter_inst: instance of the rewriter to invoke.
        src_model_type: the `rewriter.ModelType` of the source model.
        dst_model_type: the `rewriter.ModelType` of the destination model.
  
      Raises:
        ValueError: if the source path is the same as the destination path.
      """
  
      if src == dst:
          raise ValueError(
              "Source path and destination path cannot match."
          )
  
      original_model = rewriter.ModelDescription(src_model_type, src)
      rewritten_model = rewriter.ModelDescription(dst_model_type, dst)
  
      rewriter_inst.perform_rewrite(original_model, rewritten_model)
  
file_path: tfx/tfx/components/trainer/rewriting/converters.py
imports: import os
  import time
  from tensorflow import estimator
  from tfx.components.trainer.rewriting import rewriter
  from tfx.dsl.io import fileio
label_desc: Use image node_id 1 for calling a global function with example usage: _invoke_rewriter(src, dst, rewriter_inst, src_model_type, dst_model_type) without return types