code: def check_type_forward(self, in_types):
      n_in = type_check.eval(in_types.size())
      if n_in != 3 and n_in != 6:
          raise type_check.InvalidType(
              "{0} or {1}".format(
                  in_types.size() == 3, in_types.size() == 6
              ),
              "{0} == {1}".format(in_types.size(), n_in),
          )
  
      e1_type, e2_type, W_type = in_types[:3]
      type_check_prod = type_check.make_variable(numpy.prod, "prod")
      type_check.expect(
          e1_type.dtype == numpy.float32,
          e1_type.ndim >= 2,
          e2_type.dtype == numpy.float32,
          e2_type.ndim >= 2,
          e1_type.shape[0] == e2_type.shape[0],
          W_type.dtype == numpy.float32,
          W_type.ndim == 3,
          type_check_prod(e1_type.shape[1:]) == W_type.shape[0],
          type_check_prod(e2_type.shape[1:]) == W_type.shape[1],
      )
  
      if n_in == 6:
          out_size = W_type.shape[2]
          V1_type, V2_type, b_type = in_types[3:]
          type_check.expect(
              V1_type.dtype == numpy.float32,
              V1_type.ndim == 2,
              V1_type.shape[0] == W_type.shape[0],
              V1_type.shape[1] == out_size,
              V2_type.dtype == numpy.float32,
              V2_type.ndim == 2,
              V2_type.shape[0] == W_type.shape[1],
              V2_type.shape[1] == out_size,
              b_type.dtype == numpy.float32,
              b_type.ndim == 1,
              b_type.shape[0] == out_size,
          )
  
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 1 for calling the BilinearFunction obj's underlying member method code with example usage: obj.check_type_forward(in_types) without return types