<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _update(self, rules: list):
 """ Updates the given rules and stores them on the router. """

        self._rules = rules
        to_store = '\n'.join(
            rule.config_string
            for rule in rules
        )
        sftp_connection = self._sftp_connection
        with sftp_connection.open(self.RULE_PATH, mode='w') as file_handle:
            file_handle.write(to_store)