code: def query_execute(df, expr, callenv):
      """Compile & execute the query expression
  
      Note: the expression is compiled and cached for future reuse.
  
      Parameters
      ----------
      df : DataFrame
      expr : str
          boolean expression
      callenv : dict
          Contains keys 'local_dict', 'locals' and 'globals' which are all dict.
          They represent the arg, local and global dictionaries of the caller.
      """
  
      # compile
      compiled = query_compile(expr)
      columns = compiled["colnames"]
  
      # prepare col args
      colarrays = [
          cudf.core.dataframe.extract_col(df, col) for col in columns
      ]
  
      # wait to check the types until we know which cols are used
      if any(
          col.dtype not in SUPPORTED_QUERY_TYPES for col in colarrays
      ):
          raise TypeError(
              "query only supports numeric, datetime, timedelta, "
              "or bool dtypes."
          )
  
      colarrays = [
          col.data_array_view(mode="read") for col in colarrays
      ]
  
      kernel = compiled["kernel"]
      # process env args
      envargs = []
      envdict = callenv["globals"].copy()
      envdict.update(callenv["locals"])
      envdict.update(callenv["local_dict"])
      for name in compiled["refnames"]:
          name = name[len(ENVREF_PREFIX) :]
          try:
              val = envdict[name]
              if isinstance(val, datetime.datetime):
                  val = np.datetime64(val)
          except KeyError:
              msg = "{!r} not defined in the calling environment"
              raise NameError(msg.format(name))
          else:
              envargs.append(val)
  
      # allocate output buffer
      nrows = len(df)
      out = column_empty(nrows, dtype=np.bool_)
      # run kernel
      args = [out] + colarrays + envargs
      with _CUDFNumbaConfig():
          kernel.forall(nrows)(*args)
      out_mask = applyutils.make_aggregate_nullmask(df, columns=columns)
      return out.set_mask(out_mask).fillna(False)
  
imports: import ast
  import datetime
  from typing import Any, Dict
  import numpy
  from numba import cuda
  import cudf
  from cudf.core.buffer import acquire_spill_lock
  from cudf.core.column import column_empty
  from cudf.utils import applyutils
  from cudf.utils._numba import _CUDFNumbaConfig
  from cudf.utils.dtypes import BOOL_TYPES, DATETIME_TYPES, NUMERIC_TYPES, TIMEDELTA_TYPES
label_desc: Use image node_id 6 for calling a global function with example usage: query_execute(df, expr, callenv) and returns: out