message = service.users().messages().get(userId='me', id=msg_id, format='full'
    ).execute()
msg_str = base64.urlsafe_b64decode(message['payload']['body']['data'].
    encode('UTF8'))
mime_msg = email.message_from_string(msg_str)
print(msg_str)
What is the encoding of the body of Gmail message? How to decode it?