def login_user_block(username, ssh_keys, create_password=True):
block = {<EOL>'<STR_LIT>': '<STR_LIT:yes>' if create_password is True else '<STR_LIT>',<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': ssh_keys<EOL>}<EOL>}<EOL>if username:<EOL><INDENT>block['<STR_LIT:username>'] = username<EOL><DEDENT>return block<EOL>
Helper function for creating Server.login_user blocks.

(see: https://www.upcloud.com/api/8-servers/#create-server)