import re


def get_author_list_comma_separated(no_spaces_cited_list):
    """
    
      >>> test="Goldberg,E.L.,Myers,W.A.,Zeifman,I."
      >>> get_author_list_comma_separated(test)
      [('Goldberg,E.L.', 'Goldberg', 'E.L.'), ('Myers,W.A.', 'Myers', 'W.A.'), ('Zeifman,I.', 'Zeifman', 'I.')]
      >>> test="Goldberg,E.L."
      >>> get_author_list_comma_separated(test)
      [('Goldberg,E.L.', 'Goldberg', 'E.L.')]
      >>> test="Goldberg,E.L.,Myers,W.A. and Zeifman,I."
      >>> get_author_list_comma_separated(test)
      [('Goldberg,E.L.', 'Goldberg', 'E.L.'), ('Myers,W.A.', 'Myers', 'W.A.'), ('Zeifman,I.', 'Zeifman', 'I.')]
      >>> test="Goldberg, E.L., Myers,W.A., Zeifman,I."
      >>> get_author_list_comma_separated(test)
      [('Goldberg,E.L.', 'Goldberg', 'E.L.'), ('Myers,W.A.', 'Myers', 'W.A.'), ('Zeifman,I.', 'Zeifman', 'I.')]
      >>> test="Goldberg,E.L.Myers,W.A.Zeifman,I."
      >>> get_author_list_not_comma_separated(test)
      [('Goldberg,E.L.', 'Goldberg', 'E.L.'), ('Myers,W.A.', 'Myers', 'W.A.'), ('Zeifman,I.', 'Zeifman', 'I.')]
      
    """

    if " " in no_spaces_cited_list:
        no_spaces_cited_list = re.sub(" ", "", no_spaces_cited_list)
        
    rxpat = "(([^,]+?),((?:[A-Z]\.){1,3})(?:,|and)?)+?"

    ret_val = re.findall(rxpat, no_spaces_cited_list)
    # just first ones:
    # ret_val0 = [x[0][-1] for x in ret_val]
    return ret_val