code: def generate_credits():
      text = subprocess.check_output(["git", "shortlog", "--summary"])
      lines = text.decode("utf8").split("\n")
      contributors = [
          line.split("\t", 1)[1].strip() for line in lines if line
      ]
      contributors.sort(key=locale.strxfrm)
      with open("credits.rst", "w") as f:
          f.write(
              TEMPLATE.format(contributors=",\n".join(contributors))
          )
  
imports: from collections import Counter
  import locale
  import re
  import subprocess
label_desc: Use image node_id 2 for calling a global function with example usage: generate_credits() without return types