code: def find_node(v, cls, ignore_clients=False):
      """
      Find the node that has an op of of type `cls` in `v`.
  
      This digs through possibly redundant transfers to for the node
      that has the type `cls`. If `ignore_clients` is False (the
      default) it will only dig through nodes that have a single client
      to avoid duplicating computations.
  
      Parameters
      ----------
      v
          The variable to dig through
      cls : Op class
          The type of the node we are looking for
      ignore_clients : bool, optional
          Whether to ignore multiple clients or not.
  
      """
      if v.owner is not None and (
          ignore_clients or len(v.clients) == 1
      ):
          if isinstance(v.owner.op, cls):
              return v.owner
          elif (
              isinstance(v.owner.op, GpuFromHost)
              and v.owner.inputs[0].owner is not None
              and (
                  ignore_clients or len(v.owner.inputs[0].clients) == 1
              )
              and isinstance(v.owner.inputs[0].owner.op, HostFromGpu)
          ):
              return find_node(v.owner.inputs[0].owner.inputs[0], cls)
          else:
              return None
  
file_path: Theano/theano/gpuarray/opt_util.py
imports: from __future__ import absolute_import, print_function, division
  from functools import wraps
  import numpy
  from theano import tensor, scalar, Constant
  from theano.gof import local_optimizer
  from theano.gof.opt import inherit_stack_trace
  from theano.tensor import DimShuffle, get_scalar_constant_value, NotScalarConstantError
  from .basic_ops import GpuFromHost, HostFromGpu, GpuAllocEmpty, GpuReshape
  from .elemwise import GpuDimShuffle, GpuElemwise
label_desc: Use image node_id 2 for calling a global function with example usage: find_node(v, cls, ignore_clients) and returns: v, find_node, None