<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def author_name_from_json(author_json):
    "concatenate an author name from json data"
    author_name = None
    if author_json.get('type'):
        if author_json.get('type') == 'group' and author_json.get('name'):
            author_name = author_json.get('name')
        elif author_json.get('type') == 'person' and author_json.get('name'):
            if author_json.get('name').get('preferred'):
                author_name = author_json.get('name').get('preferred')
    return author_name