code: def check_cutensor_version(compiler, settings):
      global _cutensor_version
      try:
          out = build_and_run(
              compiler,
              """
          #include <cutensor.h>
          #include <stdio.h>
          #ifdef CUTENSOR_MAJOR
          #ifndef CUTENSOR_VERSION
          #define CUTENSOR_VERSION \
                  (CUTENSOR_MAJOR * 1000 + CUTENSOR_MINOR * 100 + CUTENSOR_PATCH)
          #endif
          #else
          #  define CUTENSOR_VERSION 0
          #endif
          int main(int argc, char* argv[]) {
            printf("%d", CUTENSOR_VERSION);
            return 0;
          }
          """,
              include_dirs=settings["include_dirs"],
          )
  
      except Exception as e:
          utils.print_warning(
              "Cannot check cuTENSOR version\n{0}".format(e)
          )
          return False
  
      _cutensor_version = int(out)
  
      if _cutensor_version < 2000:
          utils.print_warning(
              "Unsupported cuTENSOR version: {}".format(
                  _cutensor_version
              )
          )
          return False
  
      return True
  
imports: import contextlib
  import os
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import tempfile
  from typing import List, Set
  import cupy_builder
  import cupy_builder.install_utils
  from cupy_builder import _environment
  from cupy_builder._context import Context
label_desc: Use image node_id 25 for calling a global function with example usage: check_cutensor_version(compiler, settings) and returns: True, False, False