public static void addRequirementToTxtOrSetupPy(@NotNull Module module,
                                                  @NotNull String requirementName,
                                                  @NotNull LanguageLevel languageLevel) {
    final VirtualFile requirementsTxt = findRequirementsTxt(module);
    if (requirementsTxt != null && requirementsTxt.isWritable()) {
      final Document document = FileDocumentManager.getInstance().getDocument(requirementsTxt);
      if (document != null) {
        document.insertString(0, requirementName + "\n");
      }
      return;
    }

    final PyFile setupPy = findSetupPy(module);
    if (setupPy == null) return;

    final PyCallExpression setupCall = findSetupCall(setupPy);
    if (setupCall == null) return;

    final PsiElement installRequires = findSetupPyInstallRequires(setupCall);
    if (installRequires != null) {
      addRequirementToInstallRequires(installRequires, requirementName, languageLevel);
    }
    else {
      final PyArgumentList argumentList = setupCall.getArgumentList();
      final PyKeywordArgument requiresArg = generateRequiresKwarg(setupPy, requirementName, languageLevel);

      if (argumentList != null && requiresArg != null) {
        argumentList.addArgument(requiresArg);
      }
    }
  }
public static void addRequirementToTxtOrSetupPy(@NotNull Module module,
                                                  @NotNull String requirementName,
                                                  @NotNull LanguageLevel languageLevel)