code: def test_report_key_pattern(self):
      self.trainer.extend(self.create_extension())
      self.trainer.run()
  
      pattern = r"^(.+/){2,}(data|grad)/.+[^/]$"
      for name in six.iterkeys(self.trainer.observation):
          if self.prefix is not None:
              assert name.startswith(self.prefix)
  
          match = re.match(pattern, name)
          assert match is not None
          if self.report_params and self.report_grads:
              pass
          elif self.report_params:
              assert "data" == match.group(2)
          elif self.report_grads:
              assert "grad" == match.group(2)
  
imports: import re
  import time
  import unittest
  import mock
  import six
  import chainer
  from chainer import backend
  from chainer import testing
  from chainer import training
  from chainer.training import extensions
label_desc: Use image node_id 3 for calling the TestParameterStatistics obj's underlying member method code with example usage: obj.test_report_key_pattern() without return types