code: def get_primary_author(cmd, distinct_authors):
      author_pat = re.compile(r"(.*) <(.*)>")
  
      while True:
          primary_author = cmd.prompt(
              "Enter primary author in the format of "
              '"name <email>" [%s]: ' % distinct_authors[0]
          )
  
          if primary_author == "":
              return distinct_authors[0], distinct_authors[1:]
  
          if author_pat.match(primary_author):
              break
          print(
              'Bad author "{}", please try again'.format(primary_author)
          )
  
      # When primary author is specified manually, de-dup it from
      # author list and put it at the head of author list.
      distinct_other_authors = [
          x for x in distinct_authors if x != primary_author
      ]
      return primary_author, distinct_other_authors
  
imports: import configparser
  import os
  import pprint
  import re
  import subprocess
  import sys
  import requests
  import getpass
  from six.moves import input
  import six
label_desc: Use image node_id 7 for calling a global function with example usage: get_primary_author(cmd, distinct_authors) and returns: primary_author,  distinct_other_authors, distinct_authors,  distinct_authors