code: def check_duplicates():
      text = subprocess.check_output(
          ["git", "shortlog", "--summary", "--email"]
      )
      lines = text.decode("utf8").split("\n")
      contributors = [
          line.split("\t", 1)[1].strip() for line in lines if line
      ]
      emails = [
          re.match(".*<(.*)>", line).group(1) for line in contributors
      ]
      email_counter = Counter(emails)
  
      if email_counter.most_common(1)[0][1] > 1:
          print(
              "DUPLICATE CHECK: The following email addresses are used with "
              "more than one name.\nConsider adding them to .mailmap.\n"
          )
          for email, count in email_counter.items():
              if count > 1:
                  print(
                      "{}\n{}".format(
                          email,
                          "\n".join(l for l in lines if email in l),
                      )
                  )
  
imports: from collections import Counter
  import locale
  import re
  import subprocess
label_desc: Use image node_id 1 for calling a global function with example usage: check_duplicates() without return types