def bet_cancel(self, bet_to_cancel, account=None, **kwargs):
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>account = Account(account)<EOL>bet = Bet(bet_to_cancel)<EOL>op = operations.Bet_cancel(<EOL>**{<EOL>"<STR_LIT>": {"<STR_LIT>": <NUM_LIT:0>, "<STR_LIT>": "<STR_LIT>"},<EOL>"<STR_LIT>": account["<STR_LIT:id>"],<EOL>"<STR_LIT>": bet["<STR_LIT:id>"],<EOL>"<STR_LIT>": self.prefix,<EOL>}<EOL>)<EOL>return self.finalizeOp(op, account["<STR_LIT:name>"], "<STR_LIT>", **kwargs)<EOL>
Cancel a bet

            :param str bet_to_cancel: The identifier that identifies the bet to
                cancel
            :param str account: (optional) the account that owns the bet
                (defaults to ``default_account``)