code: def check_argmax(self, cost_data, xs_data):
      cost = chainer.Variable(cost_data)
      xs = [chainer.Variable(x) for x in xs_data]
      s, path = functions.loss.crf1d.argmax_crf1d(cost, xs)
  
      self.assertIsInstance(s, chainer.Variable)
      self.assertIsInstance(path, list)
      self.assertEqual(s.shape, (self.batches[0],))
      self.assertEqual(len(path), len(self.batches))
      for b, p in zip(self.batches, path):
          self.assertEqual(p.shape, (b,))
  
      best_paths = [
          numpy.empty((length,), numpy.int32) for length in self.batches
      ]
      for b, length in enumerate(self.lengths):
          best_path = None
          best_score = 0
          for ys in itertools.product(
              range(self.n_label), repeat=length
          ):
              score = self._calc_score(b, ys)
              if best_path is None or best_score < score:
                  best_path = ys
                  best_score = score
  
          for i, p in enumerate(best_path):
              best_paths[i][b] = p
  
          testing.assert_allclose(s.data[b], best_score)
  
      for t in range(len(self.batches)):
          numpy.testing.assert_array_equal(
              cuda.to_cpu(path[t]), best_paths[t]
          )
  
imports: import itertools
  import unittest
  import numpy
  import chainer
  from chainer.backends import cuda
  from chainer import functions
  from chainer import gradient_check
  from chainer import testing
  from chainer.testing import attr
label_desc: Use image node_id 9 for calling the TestCRF1d obj's underlying member method code with example usage: obj.check_argmax(cost_data, xs_data) without return types