<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_default_account_by_index(self, index: int):
 """ This interface is used to set default account by given index. :param index: an int value that indicate the account object in account list. """

        if index >= len(self.accounts):
            raise SDKException(ErrorCode.param_error)
        for acct in self.accounts:
            acct.is_default = False
        self.accounts[index].is_default = True
        self.default_account_address = self.accounts[index].b58_address