class_docstr: Function that broadcasts an array to a new shape.
class_docstr_tok: ["Function","that","broadcasts","an","array","to","a","new","shape","."]
code: def check_type_forward(self, in_types):
      type_check._argname(in_types, ("x",))
  
      ndim = type_check.make_variable(len(self._shape), "len(shape)")
      type_check.expect(in_types[0].ndim <= ndim)
  
      shape = type_check.eval(in_types[0].shape)
      # check the shape in inverse order
      for i in six.moves.range(-1, -len(shape) - 1, -1):
          if shape[i] == self._shape[i] or shape[i] == 1:
              continue
          expect = "in_type[0].shape[%d] == %d" % (i, self._shape[i])
          if self._shape[i] != 1:
              expect += " or in_type[0].shape[%d] == 1" % i
          actual = "in_type[0].shape: %s" % str(shape)
          raise type_check.InvalidType(expect, actual)
  
imports: import six
  import chainer
  from chainer import backend
  from chainer import function_node
  from chainer.utils import type_check
  import chainerx
label_desc: Use image node_id 2 for calling the BroadcastTo obj's underlying member method code with example usage: obj.check_type_forward(in_types) without return types