<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_join_rule(self, room_id, join_rule):
 """Set the rule for users wishing to join the room. Args: room_id(str):
 The room to set the rules for. join_rule(str):
 The chosen rule. One of: ["public", "knock", "invite", "private"] """

        content = {
            "join_rule": join_rule
        }
        return self.send_state_event(room_id, "m.room.join_rules", content)