def disallow(<EOL>self, foreign, permission="<STR_LIT>", account=None, threshold=None, **kwargs<EOL>):
if not account:<EOL><INDENT>if "<STR_LIT>" in self.config:<EOL><INDENT>account = self.config["<STR_LIT>"]<EOL><DEDENT><DEDENT>if not account:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if permission not in ["<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>account = Account(account, blockchain_instance=self)<EOL>authority = account[permission]<EOL>try:<EOL><INDENT>pubkey = PublicKey(foreign, prefix=self.prefix)<EOL>affected_items = list(<EOL>filter(lambda x: x[<NUM_LIT:0>] == str(pubkey), authority["<STR_LIT>"])<EOL>)<EOL>authority["<STR_LIT>"] = list(<EOL>filter(lambda x: x[<NUM_LIT:0>] != str(pubkey), authority["<STR_LIT>"])<EOL>)<EOL><DEDENT>except:<EOL><INDENT>try:<EOL><INDENT>foreign_account = Account(foreign, blockchain_instance=self)<EOL>affected_items = list(<EOL>filter(<EOL>lambda x: x[<NUM_LIT:0>] == foreign_account["<STR_LIT:id>"],<EOL>authority["<STR_LIT>"],<EOL>)<EOL>)<EOL>authority["<STR_LIT>"] = list(<EOL>filter(<EOL>lambda x: x[<NUM_LIT:0>] != foreign_account["<STR_LIT:id>"],<EOL>authority["<STR_LIT>"],<EOL>)<EOL>)<EOL><DEDENT>except:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>if not affected_items:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>removed_weight = affected_items[<NUM_LIT:0>][<NUM_LIT:1>]<EOL>if threshold:<EOL><INDENT>authority["<STR_LIT>"] = threshold<EOL><DEDENT>try:<EOL><INDENT>self._test_weights_treshold(authority)<EOL><DEDENT>except:<EOL><INDENT>log.critical(<EOL>"<STR_LIT>" % (removed_weight)<EOL>)<EOL>authority["<STR_LIT>"] -= removed_weight<EOL>self._test_weights_treshold(authority)<EOL><DEDENT>op = operations.Account_update(<EOL>**{<EOL>"<STR_LIT>": {"<STR_LIT>": <NUM_LIT:0>, "<STR_LIT>": "<STR_LIT>"},<EOL>"<STR_LIT>": account["<STR_LIT:id>"],<EOL>permission: authority,<EOL>"<STR_LIT>": {},<EOL>}<EOL>)<EOL>if permission == "<STR_LIT>":<EOL><INDENT>return self.finalizeOp(op, account["<STR_LIT:name>"], "<STR_LIT>", **kwargs)<EOL><DEDENT>else:<EOL><INDENT>return self.finalizeOp(op, account["<STR_LIT:name>"], "<STR_LIT>", **kwargs)<EOL><DEDENT>
Remove additional access to an account by some other public
            key or account.

            :param str foreign: The foreign account that will obtain access
            :param str permission: (optional) The actual permission to
                modify (defaults to ``active``)
            :param str account: (optional) the account to allow access
                to (defaults to ``default_account``)
            :param int threshold: The threshold that needs to be reached
                by signatures to be able to interact