<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _find_conflicts_within_selection_set( context, # type: ValidationContext cached_fields_and_fragment_names, # type: Dict[SelectionSet, Tuple[Dict[str, List[Tuple[Union[GraphQLInterfaceType, GraphQLObjectType, None], Field, GraphQLField]]], List[str]]] compared_fragments, # type: PairSet parent_type, # type: Union[GraphQLInterfaceType, GraphQLObjectType, None] selection_set, # type: SelectionSet ):
 """Find all conflicts found "within" a selection set, including those found via spreading in fragments. Called when visiting each SelectionSet in the GraphQL Document. """

    conflicts = []  # type: List[Tuple[Tuple[str, str], List[Node], List[Node]]]
    field_map, fragment_names = _get_fields_and_fragments_names(
        context, cached_fields_and_fragment_names, parent_type, selection_set
    )

    # (A) Find all conflicts "within" the fields of this selection set.
    # Note: this is the *only place* `collect_conflicts_within` is called.
    _collect_conflicts_within(
        context,
        conflicts,
        cached_fields_and_fragment_names,
        compared_fragments,
        field_map,
    )

    # (B) Then collect conflicts between these fields and those represented by
    # each spread fragment name found.
    for i, fragment_name in enumerate(fragment_names):
        _collect_conflicts_between_fields_and_fragment(
            context,
            conflicts,
            cached_fields_and_fragment_names,
            compared_fragments,
            False,
            field_map,
            fragment_name,
        )

        # (C) Then compare this fragment with all other fragments found in this
        # selection set to collect conflicts within fragments spread together.
        # This compares each item in the list of fragment names to every other item
        # in that same list (except for itself).
        for other_fragment_name in fragment_names[i + 1 :]:
            _collect_conflicts_between_fragments(
                context,
                conflicts,
                cached_fields_and_fragment_names,
                compared_fragments,
                False,
                fragment_name,
                other_fragment_name,
            )

    return conflicts