code: def check_gpu_scalar_op(self, theano_function, scalar_optype):
      for node in theano_function.maker.fgraph.apply_nodes:
          if isinstance(node.op, GpuElemwise) and isinstance(
              node.op.scalar_op, scalar_optype
          ):
              return True
      theano.printing.debugprint(theano_function)
      return False
  
imports: from __future__ import absolute_import, print_function, division
  from copy import copy
  from unittest import TestCase
  import numpy
  import theano
  from theano import scalar, gof, tensor
  from theano.compile import DebugMode, Mode
  from theano.tests.unittest_tools import SkipTest, assert_allclose
  from theano.tensor.tests import test_elemwise
  from .config import mode_with_gpu, mode_without_gpu, test_ctx_name
  from .test_basic_ops import rand_gpuarray
  from ..elemwise import GpuElemwise, GpuDimShuffle, GpuCAReduceCuda, GpuCAReduceCPY, GpuErfinv, GpuErfcinv
  from ..dnn import GpuDnnReduction
  from ..type import GpuArrayType, get_context, gpuarray_shared_constructor
  from pygpu import ndgpuarray
label_desc: Use image node_id 2 for calling the TestMathErrorFunctions obj's underlying member method code with example usage: obj.check_gpu_scalar_op(theano_function, scalar_optype) and returns: False, True