def function(name, *args, **kwargs):
if kwargs.get("<STR_LIT>"):<EOL><INDENT>name = upkey(name)<EOL><DEDENT>else:<EOL><INDENT>name = Word(name)<EOL><DEDENT>fxn_args = None<EOL>for i, arg in enumerate(args):<EOL><INDENT>if i == <NUM_LIT:0>:<EOL><INDENT>fxn_args = arg<EOL><DEDENT>else:<EOL><INDENT>fxn_args += Suppress("<STR_LIT:U+002C>") + arg<EOL><DEDENT><DEDENT>if fxn_args is None:<EOL><INDENT>return name + Suppress("<STR_LIT:(>") + Suppress("<STR_LIT:)>")<EOL><DEDENT>if kwargs.get("<STR_LIT>"):<EOL><INDENT>return name + ((Suppress("<STR_LIT:(>") + fxn_args + Suppress("<STR_LIT:)>")) | fxn_args)<EOL><DEDENT>else:<EOL><INDENT>return name + Suppress("<STR_LIT:(>") + fxn_args + Suppress("<STR_LIT:)>")<EOL><DEDENT>
Construct a parser for a standard function format