def METHOD_NAME(node, context):
    """
    Supports the following syntax:
    - subcase-exists('parent', {subcase filter} )
    - subcase-count('host', {subcase_filter} ) {=, !=, >, <, >=, <=} {integer value}
    """
    subcase_query = _parse_normalize_subcase_query(node)
    ids = _get_parent_case_ids_matching_subcase_query(subcase_query, context)
    if subcase_query.invert:
        if not ids:
            return filters.match_all()
        return filters.NOT(filters.doc_id(ids))
    # uncomment once we are on ES > 2.4
    # if not ids:
    #     return filters.match_none()
    return filters.doc_id(ids)