code: def check_thrust_version(compiler, settings):
      global _thrust_version
  
      try:
          out = build_and_run(
              compiler,
              """
          #include <thrust/version.h>
          #include <stdio.h>
  
          int main() {
            printf("%d", THRUST_VERSION);
            return 0;
          }
          """,
              include_dirs=settings["include_dirs"],
          )
      except Exception as e:
          utils.print_warning(
              "Cannot check Thrust version\n{0}".format(e)
          )
          return False
  
      _thrust_version = int(out)
  
      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 14 for calling a global function with example usage: check_thrust_version(compiler, settings) and returns: True, False