def parse_attachment(attachment, key='media'):
    media = (attachment.get(key) or {})
    if (media.get('__typename') == 'Video'):
        return parse_graphql_video(media)
def parse_attachment(attachment, key='media'):
    media = (attachment.get(key) or {})
    if (media.get('__typename') == 'Video'):
        return parse_graphql_video(media)