@Override
  @NotNull
  public PyTargetExpressionStub createStub(@NotNull final PyTargetExpression psi, final StubElement parentStub) {
    final String name = psi.getName();
    final PyExpression assignedValue = psi.findAssignedValue();
    final String docString = DocStringUtil.getDocStringValue(psi);
    final String typeComment = psi.getTypeCommentAnnotation();
    final String annotation = psi.getAnnotationValue();

    CustomTargetExpressionStub customStub = createCustomStub(psi);
    if (customStub != null) {
      return new PyTargetExpressionStubImpl(name, docString, typeComment, annotation, psi.hasAssignedValue(), customStub, parentStub);
    }

    PyTargetExpressionStub.InitializerType initializerType = PyTargetExpressionStub.InitializerType.Other;
    QualifiedName initializer = null;
    final Ref<QualifiedName> assignedReference = PyTargetExpressionImpl.getAssignedReferenceQualifiedName(psi);
    if (assignedReference != null) {
      initializerType = PyTargetExpressionStub.InitializerType.ReferenceExpression;
      initializer = assignedReference.get();
    }
    else {
      final Ref<QualifiedName> assignedCallCalleeReference = PyTargetExpressionImpl.getAssignedCallCalleeQualifiedName(psi);
      if (assignedCallCalleeReference != null) {
        initializerType = PyTargetExpressionStub.InitializerType.CallExpression;
        initializer = assignedCallCalleeReference.get();
      }
    }
    return new PyTargetExpressionStubImpl(name, docString, initializerType, initializer, psi.isQualified(), typeComment, annotation,
                                          psi.hasAssignedValue(), parentStub);
  }
@Override
  @NotNull
  public PyTargetExpressionStub createStub(@NotNull final PyTargetExpression psi, final StubElement parentStub)