<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def SetNodeRole(r, node, role, force=False, auto_promote=False):
 """ Sets the role for a node. @type node: str @param node: the node whose role to set @type role: str @param role: the role to set for the node @type force: bool @param force: whether to force the role change @type auto_promote: bool @param auto_promote: Whether node(s) should be promoted to master candidate if necessary @rtype: int @return: job id """


    query = {
        "force": force,
        "auto_promote": auto_promote,
    }

    return r.request("put", "/2/nodes/%s/role" % node, query=query,
                     content=role)