You can replace this block with something more pythonic like: 
`first_name, last_name = data['full_name'].split(' ', 1) if ' ' in data['full_name'] else ('', data['full_name'])`