code: def get_authors(version, prevversion):
      """
      Get the list of authors since the previous release
  
      Returns the list in alphabetical order by last name.  Authors who
      contributed for the first time for this release will have a star appended
      to the end of their names.
  
      Note: it's a good idea to use ./bin/mailmap_update.py (from the base sympy
      directory) to make AUTHORS and .mailmap up-to-date first before using
      this. fab vagrant release does this automatically.
      """
  
      def lastnamekey(name):
          """
          Sort key to sort by last name
  
          Note, we decided to sort based on the last name, because that way is
          fair. We used to sort by commit count or line number count, but that
          bumps up people who made lots of maintenance changes like updating
          mpmath or moving some files around.
          """
          # Note, this will do the wrong thing for people who have multi-word
          # last names, but there are also people with middle initials. I don't
          # know of a perfect way to handle everyone. Feel free to fix up the
          # list by hand.
  
          text = name.strip().split()[-1].lower()
          # Convert things like Čertík to Certik
          return unicodedata.normalize("NFKD", text).encode(
              "ascii", "ignore"
          )
  
      # The get_previous_version function can be flakey so we require the
      # previous version to be provided explicitly by the caller.
      #
      # old_release_tag = get_previous_version_tag(version)
      old_release_tag = "sympy-" + prevversion
  
      out = check_output(
          [
              "git",
              "--no-pager",
              "log",
              old_release_tag + "..",
              "--format=%aN",
          ]
      )
      releaseauthors = set(out.decode("utf-8").strip().split("\n"))
      out = check_output(
          ["git", "--no-pager", "log", old_release_tag, "--format=%aN"]
      )
      priorauthors = set(out.decode("utf-8").strip().split("\n"))
  
      releaseauthors = {
          name.strip() for name in releaseauthors if name.strip()
      }
      priorauthors = {
          name.strip() for name in priorauthors if name.strip()
      }
      newauthors = releaseauthors - priorauthors
      starred_newauthors = {name + "*" for name in newauthors}
      authors = releaseauthors - newauthors | starred_newauthors
      return (
          sorted(authors, key=lastnamekey),
          len(releaseauthors),
          len(newauthors),
      )
  
file_path: sympy/release/authors.py
imports: import os
  from pathlib import Path
  from subprocess import check_output
  import unicodedata
label_desc: Use image node_id 3 for calling a global function with example usage: get_authors(version, prevversion) and returns: sorted,  len,  len, unicodedata