def METHOD_NAME(action, build_all):  # type: (str, bool) -> tuple[bool, bool]
    """
    :return: (build_or_not_for_test_related_apps, build_or_not_for_non_related_apps)
    """
    if build_all or _has_build_all_label() or (not os.getenv('BOT_TRIGGER_WITH_LABEL')):
        logging.info('Build all apps')
        return True, True
    labels = TEST_LABELS[action]
    if not isinstance(labels, list):
        labels = [labels]  # type: ignore
    for label in labels:
        if os.getenv(label):
            logging.info('Build only test cases apps')
            return True, False
    logging.info('Skip all')
    return False, False