@NotNull
  private Set<Pair<Instruction, Integer>> findDependencies(@NotNull List<DefinitionMap> definitionMaps,
                                                           @NotNull Instruction instruction,
                                                           int descriptorId,
                                                           Map<PsiElement, Collection<ReadWriteVariableInstruction>> scopeCache) {
    DefinitionMap definitionMap = definitionMaps.get(instruction.num());
    IntSet definitions = definitionMap.getDefinitions(descriptorId);

    LinkedHashSet<Pair<Instruction, Integer>> pairs = new LinkedHashSet<>();

    if (definitions == null) return pairs;

    for (int defIndex : definitions) {
      Instruction write = myFlow.getFlow()[defIndex];
      if (write != instruction) {
        pairs.add(Pair.create(write, descriptorId));
      }
      for (ReadWriteVariableInstruction dependency : findReadDependencies(write, it -> myFromByElements.getOrDefault(it, emptyList()), scopeCache)) {
        pairs.add(Pair.create(dependency, dependency.getDescriptor()));
      }
    }
    return pairs;
  }
@NotNull
  private Set<Pair<Instruction, Integer>> findDependencies(@NotNull List<DefinitionMap> definitionMaps,
                                                           @NotNull Instruction instruction,
                                                           int descriptorId,
                                                           Map<PsiElement, Collection<ReadWriteVariableInstruction>> scopeCache)