code: def forward(self, inputs):
      self.retain_inputs(tuple(range(len(inputs))))
  
      e1 = _as_mat(inputs[0])
      e2 = _as_mat(inputs[1])
      W = inputs[2]
  
      xp = backend.get_array_module(*inputs)
      # optimize: y = xp.einsum('ij,ik,jkl->il', e1, e2, W)
      y = xp.tensordot(xp.einsum("ij,ik->ijk", e1, e2), W, axes=2)
  
      if len(inputs) == 6:
          V1, V2, b = inputs[3:]
          y += e1.dot(V1)
          y += e2.dot(V2)
          y += b
      return (y,)
  
imports: import numpy
  import chainer
  from chainer import backend
  from chainer import function_node
  from chainer.utils import type_check
label_desc: Use image node_id 2 for calling the BilinearFunction obj's underlying member method code with example usage: obj.forward(inputs) and returns: y