code: def test_tvmc_import_package_project_dir(
      tflite_mobilenet_v1_1_quant, tflite_compile_model
  ):
      pytest.importorskip("tflite")
  
      # Generate a MLF archive.
      compiled_model_mlf_tvmc_package = tflite_compile_model(
          tflite_mobilenet_v1_1_quant, output_format="mlf"
      )
  
      # Import the MLF archive setting 'project_dir'. It must succeed.
      mlf_archive_path = compiled_model_mlf_tvmc_package.package_path
      tvmc_package = TVMCPackage(
          mlf_archive_path, project_dir="/tmp/foobar"
      )
      assert (
          tvmc_package.type == "mlf"
      ), "Can't load the MLF archive passing the project directory!"
  
      # Generate a Classic archive.
      compiled_model_classic_tvmc_package = tflite_compile_model(
          tflite_mobilenet_v1_1_quant
      )
  
      # Import the Classic archive setting 'project_dir'.
      # It must fail since setting 'project_dir' is only support when importing a MLF archive.
      classic_archive_path = (
          compiled_model_classic_tvmc_package.package_path
      )
      with pytest.raises(TVMCException) as exp:
          tvmc_package = TVMCPackage(
              classic_archive_path, project_dir="/tmp/foobar"
          )
  
      expected_reason = (
          "Setting 'project_dir' is only allowed when importing a MLF.!"
      )
      on_error = "A TVMCException was caught but its reason is not the expected one."
      assert str(exp.value) == expected_reason, on_error
  
file_path: tvm/tests/python/driver/tvmc/test_mlf.py
imports: import pytest
  import os
  import shlex
  import sys
  import tvm
  import tvm.testing
  from tvm.autotvm.measure.executor import Executor
  from tvm.driver import tvmc
  from tvm.driver.tvmc.main import _main
  from tvm.driver.tvmc.model import TVMCPackage, TVMCException
  from tvm.relay import backend
label_desc: Use image node_id 3 for calling a global function with example usage: test_tvmc_import_package_project_dir(tflite_mobilenet_v1_1_quant, tflite_compile_model) without return types