code: def support(ts, dtype, label_num, ignore_label):
      ret = numpy.zeros((label_num,), dtype=numpy.int32)
      for t in ts.ravel():
          if t == ignore_label:
              continue
          ret[t] += 1
      return ret
  
file_path: chainer/tests/chainer_tests/functions_tests/evaluation_tests/test_classification_summary.py
imports: import unittest
  import numpy
  import chainer
  from chainer.backends import cuda
  from chainer import functions
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 4 for calling a global function with example usage: support(ts, dtype, label_num, ignore_label) and returns: ret