code: def validate_archive_exists(test):
      fmt = test.get("archive-format")
      if fmt == "tgz":
          assert os.path.isfile(
              os.path.join(
                  test.get("export-path"),
                  test.get("model-name") + ".tar.gz",
              )
          )
      elif fmt == "no-archive":
          assert os.path.isdir(
              os.path.join(
                  test.get("export-path"), test.get("model-name")
              )
          )
      else:
          assert os.path.isfile(
              os.path.join(
                  test.get("export-path"),
                  test.get("model-name") + ".mar",
              )
          )
  
imports: import errno
  import json
  import os
  import platform
  import shutil
  import tempfile
  import time
  from argparse import Namespace
  from datetime import datetime
  from pathlib import Path
  import model_archiver
label_desc: Use image node_id 4 for calling a global function with example usage: validate_archive_exists(test) without return types