def METHOD_NAME():
    # Expect that a failing command raises a CommandError in which the return
    # code and the last successful request is caught, and that the command is
    # restarted when called again
    bc = BatchedCommand(
        cmd=py2cmd(
            """