code: def update_authors_file(lines, old_lines, update_yesno):
      if old_lines == lines:
          print(green("No changes needed in AUTHORS."))
          return 0
  
      # Actually write changes to the file?
      if update_yesno:
          write_lines(authors_path(), lines)
          print(red("Changes were made in the authors file"))
  
      # check for new additions
      new_authors = []
      for i in sorted(set(lines) - set(old_lines)):
          try:
              author_name(i)
              new_authors.append(i)
          except AssertionError:
              continue
  
      if new_authors:
          if update_yesno:
              print(
                  yellow("The following authors were added to AUTHORS.")
              )
          else:
              print(
                  green(
                      filldedent(
                          """
                  The following authors will be added to the AUTHORS file at the
                  time of the next SymPy release."""
                      )
                  )
              )
          print()
          for i in sorted(new_authors, key=lambda x: x.lower()):
              print("\t%s" % i)
  
      if new_authors and update_yesno:
          return 1
      else:
          return 0
  
imports: from __future__ import unicode_literals
  from __future__ import print_function
  import sys
  from pathlib import Path
  from subprocess import run, PIPE
  from collections import OrderedDict, defaultdict
  from argparse import ArgumentParser
  import sympy
  from sympy.utilities.misc import filldedent
  from sympy.external.importtools import version_tuple
label_desc: Use image node_id 3 for calling a global function with example usage: update_authors_file(lines, old_lines, update_yesno) and returns: int, int, int