@NotNull
  private static Set<String> getNonlocalWrites(@NotNull List<Instruction> instructions, @NotNull ScopeOwner owner) {
    final Scope scope = ControlFlowCache.getScope(owner);
    final Set<String> nonlocalWrites = new LinkedHashSet<>();
    for (Instruction instruction : getWriteInstructions(instructions)) {
      if (instruction instanceof ReadWriteInstruction) {
        final String name = ((ReadWriteInstruction)instruction).getName();
        if (scope.isNonlocal(name)) {
          nonlocalWrites.add(name);
        }
      }
    }
    return nonlocalWrites;
  }
@NotNull
  private static Set<String> getNonlocalWrites(@NotNull List<Instruction> instructions, @NotNull ScopeOwner owner)