code: def test_violations(self):
      if self.violations:
          counts = dict()
  
          for err in self.violations:
              counts[err.code] = counts.get(err.code, 0) + 1
              print(err)
  
          for n, code in sorted(
              [(n, code) for code, n in counts.items()], reverse=True
          ):
              p = lookup_error_params(code)
              print("%s %8d %s" % (code, n, p.short_desc))
  
          raise Exception(
              "PyDoc Coding Style: %d violations have been found"
              % (len(self.violations))
          )
  
file_path: TensorLayer/tests/pending/test_pydocstyle.py
imports: import os
  import unittest
  from pydocstyle.checker import check, violations
  from tests.utils import list_all_py_files
label_desc: Use image node_id 2 for calling the PyDOC_Style_Test obj's underlying member method code with example usage: obj.test_violations() without return types