private void addImportsForTypeAnnotations(@NotNull PsiElement element) {
    PsiFile file = element.getContainingFile();
    if (file == null) return;
    PyFunction function = myFunction.getElement();
    if (function == null) return;
    Project project = element.getProject();
    TypeEvalContext typeEvalContext = TypeEvalContext.userInitiated(project, file);
    PyType typeForImports = getTypeForImports(function, typeEvalContext);
    if (typeForImports != null) {
      PyTypeHintGenerationUtil.addImportsForTypeAnnotations(List.of(typeForImports), typeEvalContext, file);
    }
  }
private void addImportsForTypeAnnotations(@NotNull PsiElement element)