code: def fast_inplace_check(inputs):
      """
      Return the variables in inputs that are posible candidate for as inputs of
      inplace operation.
  
      Parameters
      ----------
      inputs : list
          Inputs Variable that you want to use as inplace destination.
  
      """
      fgraph = inputs[0].fgraph
      Supervisor = theano.compile.function_module.Supervisor
      protected_inputs = [
          f.protected
          for f in fgraph._features
          if isinstance(f, Supervisor)
      ]
      protected_inputs = sum(protected_inputs, [])  # flatten the list
      protected_inputs.extend(fgraph.outputs)
  
      inputs = [
          i
          for i in inputs
          if not isinstance(i, graph.Constant)
          and not fgraph.has_destroyers([i])
          and i not in protected_inputs
      ]
      return inputs
  
imports: from __future__ import absolute_import, print_function, division
  from collections import deque, OrderedDict
  from six import iteritems
  import itertools
  import theano
  from theano import config
  from .None import toolbox
  from .None import graph
  from theano.misc.ordered_set import OrderedSet
  from .fg import InconsistencyError
label_desc: Use image node_id 3 for calling a global function with example usage: fast_inplace_check(inputs) and returns: inputs