code: def check_cudnn_version(compiler, settings):
      global _cudnn_version
      try:
          out = build_and_run(
              compiler,
              """
          #include <cudnn.h>
          #include <stdio.h>
          int main() {
            printf("%d", CUDNN_VERSION);
            return 0;
          }
          """,
              include_dirs=settings["include_dirs"],
          )
  
      except Exception as e:
          utils.print_warning(
              "Cannot check cuDNN version\n{0}".format(e)
          )
          return False
  
      _cudnn_version = int(out)
  
      if not minimum_cudnn_version <= _cudnn_version:
          min_major = str(minimum_cudnn_version)
          utils.print_warning(
              "Unsupported cuDNN version: {}".format(
                  str(_cudnn_version)
              ),
              "cuDNN >=v{} is required".format(min_major),
          )
          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 16 for calling a global function with example usage: check_cudnn_version(compiler, settings) and returns: True, False, False