class_docstr: Performs TFJS conversion.
class_docstr_tok: ["Performs","TFJS","conversion","."]
docstr: Performs pre-rewrite checks to see if the model can be rewritten.
  
  Args:
    original_model: A `ModelDescription` object describing the model to be
      rewritten.
  
  Raises:
    ValueError: If the original model does not have the expected structure.
docstr_tok: ["Performs","pre-rewrite","checks","to","see","if","the","model","can","be","rewritten",".","Args",":","original_model",":","A","`","ModelDescription","`","object","describing","the","model","to","be","rewritten",".","Raises",":","ValueError",":","If","the","original","model","does","not","have","the","expected","structure","."]
code: def _pre_rewrite_validate(
      self, original_model: rewriter.ModelDescription
  ):
      """Performs pre-rewrite checks to see if the model can be rewritten.
  
      Args:
        original_model: A `ModelDescription` object describing the model to be
          rewritten.
  
      Raises:
        ValueError: If the original model does not have the expected structure.
      """
      if original_model.model_type != rewriter.ModelType.SAVED_MODEL:
          raise ValueError("TFJSRewriter can only convert SavedModels.")
  
file_path: tfx/tfx/components/trainer/rewriting/tfjs_rewriter.py
imports: from tensorflowjs.converters import converter
  from tfx.components.trainer.rewriting import rewriter
label_desc: Use image node_id 3 for calling the TFJSRewriter obj's underlying member method code with example usage: obj._pre_rewrite_validate(original_model) without return types