def METHOD_NAME(self, key=None):
    if key is None:
        for choice in self.cases.keys():
            if (key is None
                    or (isinstance(choice, str) and choice == "default")
                    or choice > key):
                key = choice
    elif isinstance(key, str) and key == "default":
        key = ()
    else:
        key = ("{:0{}b}".format(ast.Value.cast(key).value, len(self.test)),)
    stmts = self.cases[key]
    del self.cases[key]
    self.cases[()] = stmts
    return self