private static void insertVariableAnnotation(@NotNull PyTargetExpression target) {
    final TypeEvalContext context = TypeEvalContext.userInitiated(target.getProject(), target.getContainingFile());
    final PyType inferredType = getInferredTypeOrObject(target, context);
    PyTypeHintGenerationUtil.checkPep484Compatibility(inferredType, context);
    final String annotationText = PythonDocumentationProvider.getTypeHint(inferredType, context);
    final AnnotationInfo info = new AnnotationInfo(annotationText, inferredType);
    if (isInstanceAttribute(target, context)) {
      final List<PyTargetExpression> classLevelAttrs = findClassLevelDefinitions(target, context);
      if (classLevelAttrs.isEmpty()) {
        PyTypeHintGenerationUtil.insertStandaloneAttributeAnnotation(target, context, info, true);
      }
      else {
        PyTypeHintGenerationUtil.insertVariableAnnotation(classLevelAttrs.get(0), context, info, true);
      }
    }
    else {
      PyTypeHintGenerationUtil.insertVariableAnnotation(target, context, info, true);
    }
  }
private static void insertVariableAnnotation(@NotNull PyTargetExpression target)