code: def pytest_sessionfinish(
      session: Session, exitstatus: int | ExitCode
  ) -> None:
      config = session.config
  
      _teardown_session_environment(
          session,
          "BENTOML_BUNDLE_LOCAL_BUILD",
          "PROMETHEUS_MULTIPROC_DIR",
          "SETUPTOOLS_USE_DISTUTILS",
          "__BENTOML_DEBUG_USAGE",
          "BENTOML_DO_NOT_TRACK",
      )
      _teardown_session_environment(config, "BENTOML_HOME")
  
      # reset home and prometheus_multiproc_dir to default
      BentoMLContainer.prometheus_multiproc_dir.reset()
  
imports: from __future__ import annotations
  import contextlib
  import os
  import tempfile
  import typing
  from typing import TYPE_CHECKING
  import psutil
  import pytest
  from pytest import MonkeyPatch
  import bentoml
  from bentoml._internal.configuration import BENTOML_VERSION
  from bentoml._internal.configuration import clean_bentoml_version
  from bentoml._internal.configuration.containers import BentoMLContainer
  from bentoml._internal.models import ModelContext
  from bentoml._internal.utils import LazyLoader
  from bentoml._internal.utils import validate_or_create_dir
label_desc: Use image node_id 12 for calling a global function with example usage: pytest_sessionfinish(session, exitstatus) without return types