def new_from_tokens(self, *args, **kwargs):
if kwargs.get('<STR_LIT>'):<EOL><INDENT>args = [ x.strip() for x in args if not re.match(r'<STR_LIT>', x) ]<EOL><DEDENT>else:<EOL><INDENT>args = [ x.strip() for x in args if not re.match(r'<STR_LIT>', x) ]<EOL><DEDENT>if len(args) > <NUM_LIT:2>:<EOL><INDENT>self.detect_and_fix_two_part_surname(args)<EOL><DEDENT>self.first = '<STR_LIT>'<EOL>self.last = '<STR_LIT>'<EOL>if len(args):<EOL><INDENT>if self.is_an_honorific(args[-<NUM_LIT:1>]):<EOL><INDENT>self.honorific = args.pop()<EOL>if not self.honorific[-<NUM_LIT:1>] == '<STR_LIT:.>':<EOL><INDENT>self.honorific += '<STR_LIT:.>'<EOL><DEDENT><DEDENT>if self.is_a_suffix(args[-<NUM_LIT:1>]):<EOL><INDENT>self.suffix = args.pop()<EOL>if re.match(r'<STR_LIT>', self.suffix, re.IGNORECASE):<EOL><INDENT>self.suffix += '<STR_LIT:.>'<EOL><DEDENT><DEDENT>if self.is_a_nickname(args[-<NUM_LIT:1>]):<EOL><INDENT>self.nick = args.pop()<EOL><DEDENT>self.last = args.pop()<EOL><DEDENT>num_remaining_parts = len(args)<EOL>if num_remaining_parts == <NUM_LIT:3>:<EOL><INDENT>self.first = args[<NUM_LIT:0>]<EOL>self.middle = '<STR_LIT:U+0020>'.join(args[<NUM_LIT:1>:<NUM_LIT:3>])<EOL><DEDENT>elif num_remaining_parts == <NUM_LIT:2>:<EOL><INDENT>self.first, self.middle = args<EOL>if len(self.middle) == <NUM_LIT:1>:<EOL><INDENT>self.middle += '<STR_LIT:.>'<EOL><DEDENT><DEDENT>elif num_remaining_parts == <NUM_LIT:1>:<EOL><INDENT>self.first = '<STR_LIT:U+0020>'.join(args)<EOL><DEDENT>if self.first and len(self.first) == <NUM_LIT:1>:<EOL><INDENT>self.first += '<STR_LIT:.>'<EOL><DEDENT>return self<EOL>
Takes in a name that has been split by spaces.
Names which are in [last, first] format need to be preprocessed.
The nickname must be in double quotes to be recognized as such.

This can take name parts in in these orders:
first, middle, last, nick, suffix, honorific
first, middle, last, nick, suffix
first, middle, last, suffix, honorific
first, middle, last, honorific
first, middle, last, suffix
first, middle, last, nick
first, last, honorific
first, last, suffix
first, last, nick
first, middle, last
first, last
last