code: def local_1msigmoid(node):
      """
      1-sigm(x) -> sigm(-x)
  
      """
      if node.op == tensor.sub:
          sub_l, sub_r = node.inputs
          if len(sub_r.clients) > 1:
              return  # graph is using both sigm and 1-sigm
          if sub_r.owner and sub_r.owner.op == sigmoid:
              try:
                  val_l = opt.get_scalar_constant_value(sub_l)
              except tensor.NotScalarConstantError:
                  return
              if np.allclose(np.sum(val_l), 1):
                  out = sigmoid(-sub_r.owner.inputs[0])
                  copy_stack_trace([sub_r, node.outputs[0]], out)
                  return [out]
  
imports: from __future__ import absolute_import, print_function, division
  import warnings
  import numpy
  import theano
  from theano import config, gof, printing, scalar
  from theano.compat import imap
  from theano.printing import pprint
  from theano.tensor import basic
  from theano.tensor import elemwise, opt, NotScalarConstantError
  from theano.tensor.type import values_eq_approx_remove_inf
  from theano.gof.opt import copy_stack_trace
label_desc: Use image node_id 19 for calling a global function with example usage: local_1msigmoid(node) and returns: list