code: def _peephole(func, c, h, x):
      device = backend.get_device_from_array(x)
      with chainer.using_device(device):
          xp = device.xp
          lstm_in = x.dot(func.upward.W.data.T)
          lstm_in += h.dot(func.lateral.W.data.T)
          lstm_in = xp.reshape(
              lstm_in, (len(lstm_in), lstm_in.shape[1] // 4, 4)
          )
          a, i, f, o = xp.split(lstm_in, 4, 2)
          a = xp.reshape(a, (len(a), a.shape[1]))
          i = xp.reshape(i, (len(i), i.shape[1]))
          f = xp.reshape(f, (len(f), f.shape[1]))
          o = xp.reshape(o, (len(o), o.shape[1]))
          peep_in_i = c.dot(func.peep_i.W.data.T)
          peep_in_f = c.dot(func.peep_f.W.data.T)
          a = xp.tanh(a)
          i = _sigmoid(i + peep_in_i)
          f = _sigmoid(f + peep_in_f)
          c_next = a * i + f * c
          peep_in_o = c_next.dot(func.peep_o.W.data.T)
          o = _sigmoid(o + peep_in_o)
          y = o * xp.tanh(c_next)
      return c_next, y
  
imports: import unittest
  import numpy
  import chainer
  from chainer import backend
  from chainer.backends import cuda
  from chainer import gradient_check
  from chainer import links
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 2 for calling a global function with example usage: _peephole(func, c, h, x) and returns: c_next,  y