code: def detect_compiler_type(platform: TestPlatform) -> CompilerType:
      if platform == TestPlatform.OSS:
          from package.oss.utils import (  # type: ignore[assignment, import, misc]
              detect_compiler_type,
          )
  
          cov_type = detect_compiler_type()  # type: ignore[call-arg]
      else:
          from caffe2.fb.code_coverage.tool.package.fbcode.utils import (  # type: ignore[import]
              detect_compiler_type,
          )
  
          cov_type = detect_compiler_type()
  
      check_compiler_type(cov_type)
      return cov_type
  
imports: import os
  import shutil
  import sys
  import time
  from typing import Any, NoReturn, Optional
  from .setting import CompilerType, LOG_DIR, PROFILE_DIR, TestList, TestPlatform, TestType
label_desc: Use image node_id 13 for calling a global function with example usage: detect_compiler_type(platform) and returns: cov_type