def METHOD_NAME(
    query: str, group: Group, user: User, environments: Sequence[Environment]
) -> Sequence[Condition]:
    from sentry.utils.snuba import resolve_column, resolve_conditions
    dataset = (
        Dataset.Events if group.issue_category == GroupCategory.ERROR else Dataset.IssuePlatform
    )
    # syntactically correct search filters
    search_filters = parse_and_convert_issue_search_query(
        query, group.project.organization, [group.project], environments, user
    )
    # transform search filters -> the legacy condition format
    legacy_conditions = []
    if search_filters:
        for search_filter in search_filters:
            from sentry.api.serializers import GroupSerializerSnuba
            if search_filter.key.name not in GroupSerializerSnuba.skip_snuba_fields:
                filter_keys = {
                    "organization_id": group.project.organization.id,
                    "project_id": [group.project.id],
                    "environment": [env.name for env in environments],
                }
                legacy_condition, projects_to_filter, group_ids = format_search_filter(
                    search_filter, params=filter_keys
                )
                # if no re-formatted conditions, use fallback method
                new_condition = None
                if legacy_condition:
                    new_condition = legacy_condition[0]
                elif group_ids:
                    new_condition = convert_search_filter_to_snuba_query(
                        search_filter,
                        params=filter_keys,
                    )
                if new_condition:
                    legacy_conditions.append(new_condition)
    # the transformed conditions is generic and isn't 'dataset aware', we need to map the generic columns
    # being queried to the appropriate dataset column
    resolved_legacy_conditions = resolve_conditions(legacy_conditions, resolve_column(dataset))
    # convert the legacy condition format into the SnQL condition format
    snql_conditions = []
    for cond in resolved_legacy_conditions or ():
        if not is_condition(cond):
            # this shouldn't be possible since issue search only allows ands
            or_conditions = []
            for or_cond in cond:
                or_conditions.append(parse_condition(or_cond))
            if len(or_conditions) > 1:
                snql_conditions.append(Or(or_conditions))
            else:
                snql_conditions.extend(or_conditions)
        else:
            snql_conditions.append(parse_condition(cond))
    return snql_conditions