code: def model_exists(model_prefix: str) -> bool:
      if not tf.io.gfile.exists(
          model_prefix + ".data-00000-of-00001"
      ) or not tf.io.gfile.exists(model_prefix + ".index"):
          return False
      # If it's a Slim model, we also expect a .meta file.
      if not _USE_SLIM_MODEL.value and not tf.io.gfile.exists(
          model_prefix + ".meta"
      ):
          return False
      return True
  
imports: import enum
  import os
  import subprocess
  import sys
  import tempfile
  from typing import List, Optional
  from absl import app
  from absl import flags
  from absl import logging
  import tensorflow
label_desc: Use image node_id 21 for calling a global function with example usage: model_exists(model_prefix) and returns: True, False, False