code: def masked_scalar_bool_impl(context, builder, sig, args):
      indata = cgutils.create_struct_proxy(sig.args[0])(
          context, builder, value=args[0]
      )
      result = cgutils.alloca_once(builder, ir.IntType(1))
      with builder.if_else(indata.valid) as (then, otherwise):
          with then:
              builder.store(
                  context.cast(
                      builder,
                      indata.value,
                      sig.args[0].value_type,
                      types.boolean,
                  ),
                  result,
              )
          with otherwise:
              builder.store(
                  context.get_constant(types.boolean, 0), result
              )
      return builder.load(result)
  
imports: import operator
  from llvmlite import ir
  from numba.core import cgutils
  from numba.core.typing import signature
  from numba.cuda.cudaimpl import lower, registry
  from numba.extending import lower_builtin, types
  from cudf.core.udf import api
  from cudf.core.udf._ops import arith_ops, bitwise_ops, comparison_ops, unary_ops
  from cudf.core.udf.masked_typing import MaskedType, NAType, _supported_masked_types
label_desc: Use image node_id 12 for calling a global function with example usage: masked_scalar_bool_impl(context, builder, sig, args) and returns: builder