def METHOD_NAME():
    dialogs_batch = [None]
    st_time = time.time()
    dialogs_batch = request.json["dialogs"]
    rand_seed = request.json.get("rand_seed")
    responses = []
    for dialog in dialogs_batch:
        prev_skill_outputs = get_skill_outputs_from_dialog(
            dialog["utterances"][-MEMORY_LENGTH:], "game_cooperative_skill", activated=True
        )
        is_active_last_answer = bool(prev_skill_outputs)
        human_attr = dialog["human"]["attributes"]
        prev_state = human_attr.get("game_cooperative_skill", {}).get("state", {})
        try:
            state = copy.deepcopy(prev_state)
            if state and not is_active_last_answer:
                state["messages"] = []
            # pre_len = len(state.get("messages", []))
            last_utter = dialog["human_utterances"][-1]
            last_utter_text = last_utter["text"].lower()
            agent_intents = get_agent_intents(last_utter)
            # for tests
            attr = {}
            if rand_seed:
                random.seed(int(rand_seed))
            response, state = skill([last_utter_text], state, agent_intents)
            # logger.info(f"state = {state}")
            # logger.info(f"last_utter_text = {last_utter_text}")
            # logger.info(f"response = {response}")
            bot_utterance = dialog["bot_utterances"][-1] if dialog["bot_utterances"] else {}
            text = response.get("text", "Sorry")
            if not response.get("confidence"):
                confidence = 0
            elif (
                not is_active_last_answer
                and if_chat_about_particular_topic(
                    dialog["human_utterances"][-1],
                    bot_utterance,
                    compiled_pattern=GAMES_COMPILED_PATTERN,
                )
                and find_games_in_text(last_utter_text)
            ):
                confidence = 0
            elif not is_active_last_answer and if_chat_about_particular_topic(
                dialog["human_utterances"][-1],
                bot_utterance,
                compiled_pattern=GAMES_COMPILED_PATTERN,
            ):
                confidence = 1
            elif is_active_last_answer:
                confidence = 1
            elif is_yes(dialog["human_utterances"][-1]) and game_skill_was_proposed(bot_utterance):
                confidence = 1
            elif not is_yes(dialog["human_utterances"][-1]) and game_skill_was_proposed(bot_utterance):
                confidence = 0.95
                text = FALLBACK_ACKN_TEXT
                state = prev_state
            elif GAMES_COMPILED_PATTERN.search(last_utter_text) and not is_active_last_answer:
                confidence = 0.98
            else:
                confidence = 0
            curr_text = clean_text(text.lower())
            last_text = clean_text(bot_utterance.get("text", "").lower())
            ratio = difflib.SequenceMatcher(None, curr_text.split(), last_text.split()).ratio()
            if ratio > 0.95:
                confidence = 0
            if confidence == 1:
                can_continue = MUST_CONTINUE
            elif confidence > 0.95:
                can_continue = CAN_CONTINUE_SCENARIO
            else:
                can_continue = CAN_NOT_CONTINUE
            human_attr["game_cooperative_skill"] = {"state": state}
            attr["can_continue"] = can_continue
        except Exception as exc:
            sentry_sdk.capture_exception(exc)
            logger.exception(exc)
            text = ""
            confidence = 0.0
            human_attr["game_cooperative_skill"] = {"state": prev_state}
            attr = {}
        bot_attr = {}
        responses.append((text, confidence, human_attr, bot_attr, attr))
        total_time = time.time() - st_time
        logger.info(f"game_cooperative_skill exec time = {total_time:.3f}s")
    return jsonify(responses)