code: def test_trigger_sparse_call(self):
      trainer = testing.get_trainer_with_mock_updater(
          stop_trigger=None, iter_per_epoch=self.iter_per_epoch
      )
      trigger = training.triggers.OnceTrigger(self.call_on_resume)
      accumulated = False
      accumulated_finished = True
      for expected, finished in zip(self.expected, self.finished):
          accumulated = accumulated or expected
          accumulated_finished = accumulated_finished and finished
          if random.randrange(2):
              self.assertEqual(trigger.finished, accumulated_finished)
              self.assertEqual(trigger(trainer), accumulated)
              accumulated = False
              accumulated_finished = True
          trainer.updater.update()
  
file_path: chainer/tests/chainer_tests/training_tests/triggers_tests/test_once_trigger.py
imports: from __future__ import division
  import random
  import tempfile
  import unittest
  import numpy
  from chainer import serializers
  from chainer import testing
  from chainer.testing import condition
  from chainer import training
label_desc: Use image node_id 4 for calling the TestOnceTrigger obj's underlying member method code with example usage: obj.test_trigger_sparse_call() without return types