code: def find_conflicts_within_selection_set(
      context: ValidationContext,
      cached_fields_and_fragment_names: Dict,
      compared_fragment_pairs: "PairSet",
      parent_type: Optional[GraphQLNamedType],
      selection_set: SelectionSetNode,
  ) -> List[Conflict]:
      
      conflicts: List[Conflict] = []
  
      field_map, fragment_names = get_fields_and_fragment_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_fragment_pairs,
          field_map,
      )
  
      if fragment_names:
          compared_fragments: Set[str] = set()
          # (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,
                  compared_fragment_pairs,
                  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_fragment_pairs,
                      False,
                      fragment_name,
                      other_fragment_name,
                  )
  
      return conflicts
docs: Find conflicts within selection set.
  
      Find all conflicts found "within" a selection set, including those found via
      spreading in fragments.
  
      Called when visiting each SelectionSet in the GraphQL Document.