private static @NotNull PsiTypeParameter resolveTypeParametersCollision(@NotNull JVMElementFactory factory,
                                                                          @NotNull PsiTypeParameterList sourceTypeParameterList,
                                                                          @Nullable PsiElement target,
                                                                          @NotNull PsiTypeParameter typeParam,
                                                                          @NotNull PsiSubstitutor substitutor) {
    String typeParamName = typeParam.getName();
    for (PsiType type : substitutor.getSubstitutionMap().values()) {
      if (type != null && Objects.equals(type.getCanonicalText(), typeParamName)) {
        final String newName = suggestUniqueTypeParameterName(typeParamName, sourceTypeParameterList, PsiTreeUtil.getParentOfType(target, PsiClass.class, false));
        return factory.createTypeParameter(newName, typeParam.getSuperTypes());
      }
    }
    return factory.createTypeParameter(typeParamName, typeParam.getSuperTypes());
  }
private static @NotNull PsiTypeParameter resolveTypeParametersCollision(@NotNull JVMElementFactory factory,
                                                                          @NotNull PsiTypeParameterList sourceTypeParameterList,
                                                                          @Nullable PsiElement target,
                                                                          @NotNull PsiTypeParameter typeParam,
                                                                          @NotNull PsiSubstitutor substitutor)