class_docstr: A helper for running pylint, mostly copied from dmlc-core/scripts.
class_docstr_tok: ["A","helper","for","running","pylint",",","mostly","copied","from","dmlc-core\/scripts","."]
docstr: Get the summary of pylint's errors, warnings, etc.
docstr_tok: ["Get","the","summary","of","pylint","'s","errors",",","warnings",",","etc","."]
code: def get_summary(
      cls, path: str
  ) -> Tuple[str, Dict[str, int], str, str, bool]:
      """Get the summary of pylint's errors, warnings, etc."""
      ret = subprocess.run(["pylint", path], capture_output=True)
      stdout = ret.stdout.decode("utf-8")
  
      emap: Dict[str, int] = Counter()
      for line in stdout.splitlines():
          if ":" in line and (
              category := cls.MESSAGE_PREFIX_TO_CATEGORY.get(
                  line.split(":")[-2].strip()[0]
              )
          ):
              emap[category] += 1
  
      return (
          path,
          emap,
          stdout,
          ret.stderr.decode("utf-8"),
          ret.returncode == 0,
      )
  
file_path: xgboost/tests/ci_build/lint_python.py
imports: import argparse
  import os
  import pathlib
  import subprocess
  import sys
  from collections import Counter
  from multiprocessing import Pool, cpu_count
  from typing import Dict, List, Tuple
  from test_utils import PY_PACKAGE, ROOT, cd, print_time, record_time
label_desc: Use image node_id 1 for calling the PyLint obj's underlying member method code with example usage: obj.get_summary(cls, path) and returns: path,  emap,  stdout,  ret,  unknown