@Override
  public void findCollisions(@NotNull PsiElement element,
                             final @NotNull String newName,
                             @NotNull Map<? extends PsiElement, String> allRenames,
                             @NotNull List<UsageInfo> result) {
    final String newFileName = FileUtilRt.getNameWithoutExtension(newName);
    if (!PyNames.isIdentifier(newFileName)) {
      final List<UsageInfo> usages = new ArrayList<>(result);
      for (UsageInfo usageInfo : usages) {
        final PyImportStatementBase importStatement = PsiTreeUtil.getParentOfType(usageInfo.getElement(), PyImportStatementBase.class);
        if (importStatement != null) {
          result.add(new UnresolvableCollisionUsageInfo(importStatement, element) {
            @Override
            public String getDescription() {
              return PyBundle
                .message("refactoring.rename.not.valid.identifier", newFileName, importStatement.getContainingFile().getName());
            }
          });
        }
      }
    }
  }
@Override
  public void findCollisions(@NotNull PsiElement element,
                             final @NotNull String newName,
                             @NotNull Map<? extends PsiElement, String> allRenames,
                             @NotNull List<UsageInfo> result)