question: @ NotNull public static List < Pair < PsiElement , PsiElement > > findDefinitions ( String name , Collection < ? extends PsiReference > references , @ Nullable Collection < ? extends PsiElement > ignored ) { List < Pair < PsiElement , PsiElement > > conflicts = new ArrayList < Pair < PsiElement , PsiElement > > ( ) ; REF_LOOP : for ( PsiReference ref : references ) { ResolveProcessor processor = new ResolveProcessor ( name ) ; PyResolveUtil . treeCrawlUp ( processor , ref . getElement ( ) ) ; PsiElement result = processor . getResult ( ) ; if ( result != null ) { List < PsiElement > definers = processor . getDefiners ( ) ; if ( definers != null && definers . size ( ) > 0 ) { result = definers . get ( 0 ) ; } if ( ignored != null ) for ( PsiElement ignorable : ignored ) { if ( result == ignorable ) continue REF_LOOP ; } conflicts . add ( Pair . create ( ref . getElement ( ) , result ) ) ; } } return conflicts ; }
target:  For each reference in the collection, finds a definition of name visible from the point of the reference. Returns a list of such definitions.