def _insert_optional_roles(cursor, model, ident):
optional_roles = [<EOL>('<STR_LIT>', <NUM_LIT:4>,),<EOL>('<STR_LIT>', <NUM_LIT:5>,),<EOL>]<EOL>for attr, role_id in optional_roles:<EOL><INDENT>roles = model.metadata.get(attr)<EOL>if not roles:<EOL><INDENT>continue<EOL><DEDENT>usernames = [parse_user_uri(x['<STR_LIT:id>']) for x in roles]<EOL>cursor.execute("""<STR_LIT>""", (ident, role_id, usernames,))<EOL><DEDENT>
Inserts the optional roles if values for the optional roles
    exist.