code: def generate_project(
      self,
      model_library_format_path,
      standalone_crt_dir,
      project_dir,
      options,
  ):
      # Make project directory.
      project_dir.mkdir(parents=True)
      current_dir = pathlib.Path(__file__).parent.absolute()
  
      # Copy ourselves to the generated project. TVM may perform further build steps on the generated project
      # by launching the copy.
      shutil.copy2(__file__, project_dir / os.path.basename(__file__))
  
      # Place Model Library Format tarball in the special location, which this script uses to decide
      # whether it's being invoked in a template or generated project.
      project_model_library_format_path = (
          project_dir / MODEL_LIBRARY_FORMAT_RELPATH
      )
      shutil.copy2(
          model_library_format_path, project_model_library_format_path
      )
  
      # Extract Model Library Format tarball.into <project_dir>/model.
      extract_path = (
          project_dir / project_model_library_format_path.stem
      )
      with tarfile.TarFile(project_model_library_format_path) as tf:
          os.makedirs(extract_path)
          tf.extractall(path=extract_path)
  
      # Populate CRT.
      crt_path = project_dir / "crt"
      os.mkdir(crt_path)
      for item in self.CRT_COPY_ITEMS:
          src_path = standalone_crt_dir / item
          dst_path = crt_path / item
          if os.path.isdir(src_path):
              shutil.copytree(src_path, dst_path)
          else:
              shutil.copy2(src_path, dst_path)
  
      # Populate CMake file
      self._populate_cmake(
          current_dir / f"{CMAKEFILE_FILENAME}.template",
          project_dir / CMAKEFILE_FILENAME,
          options.get("workspace_size_bytes", WORKSPACE_SIZE_BYTES),
          options.get("verbose"),
      )
  
      # Populate crt-config.h
      crt_config_dir = project_dir / "crt_config"
      crt_config_dir.mkdir()
      shutil.copy2(
          current_dir / "crt_config" / "crt_config.h",
          crt_config_dir / "crt_config.h",
      )
  
      # Populate src/
      src_dir = project_dir / "src"
      src_dir.mkdir()
      shutil.copy2(
          current_dir / "src" / "main.cc",
          src_dir / "main.cc",
      )
      shutil.copy2(
          current_dir / "src" / "platform.cc",
          src_dir / "platform.cc",
      )
  
imports: import fcntl
  import os
  import os.path
  import pathlib
  import select
  import shutil
  import subprocess
  import tarfile
  import time
  import re
  from tvm.micro.project_api import server
label_desc: Use image node_id 4 for calling the Handler obj's underlying member method code with example usage: obj.generate_project(model_library_format_path, standalone_crt_dir, project_dir, options) without return types