class_docstr: Hierarchical softmax function based on a binary tree.
  
  This function object should be allocated beforehand, and be copied on every
  forward computation, since the initializer parses the given tree. See the
  implementation of :class:`BinaryHierarchicalSoftmax` for details.
  
  Args:
      tree: A binary tree made with tuples like ``((1, 2), 3)``.
  
  .. seealso::
     See :class:`BinaryHierarchicalSoftmax` for details.
code: def check_type_forward(self, in_types):
      type_check.expect(in_types.size() == 3)
      x_type, t_type, w_type = in_types
  
      type_check.expect(
          x_type.dtype.kind == "f",
          x_type.ndim == 2,
          t_type.dtype == numpy.int32,
          t_type.ndim == 1,
          x_type.shape[0] == t_type.shape[0],
          w_type.dtype == x_type.dtype,
          w_type.ndim == 2,
          w_type.shape[0] == self.parser_size,
          w_type.shape[1] == x_type.shape[1],
      )
  
imports: import copy
  import numpy
  import six
  import chainer
  from chainer.backends import cuda
  from chainer import device_resident
  from chainer import function
  from chainer.initializers import uniform
  from chainer import link
  from chainer import utils
  from chainer.utils import type_check
  from chainer import variable
label_desc: Use image node_id 2 for calling the BinaryHierarchicalSoftmaxFunction obj's underlying member method code with example usage: obj.check_type_forward(in_types) without return types