def get_formatted_authors(result, characters_remaining):
    """

    Args:
        result: (dict) entry to get authors from
        characters_remaining: (int) number of characters remaining in line

    Returns:
        (str), (int): Formatted author list and number of remaining characters in line

    """
    authors_obj = result.get('authors', [])
    if authors_obj is None:
        authors_obj = []
    full_author_list = []
    for author in authors_obj:
        if "name" in author:
            full_author_list.append(author["name"])
        elif "Name" in author:
            full_author_list.append(author["Name"])
    num_authors = len(full_author_list)
    reduced_author_list = []
    while len(full_author_list) > 0:
        author = full_author_list.pop(0)
        if characters_remaining > len(author):
            reduced_author_list.append(author)
            characters_remaining -= len(author) + 2
    authors = ", ".join(reduced_author_list)
    if len(reduced_author_list) < num_authors:
        authors += "..."

    return authors, characters_remaining