def split_name(obj):
if obj['<STR_LIT>'] in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>for key in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>if key not in obj or not obj[key]:<EOL><INDENT>(obj['<STR_LIT>'], obj['<STR_LIT>'],<EOL>obj['<STR_LIT>']) = name_tools.split(obj['<STR_LIT>'])[<NUM_LIT:1>:]<EOL>break<EOL><DEDENT><DEDENT><DEDENT>return obj<EOL>
If the supplied legislator/person object is missing 'first_name'
or 'last_name' then use name_tools to split.