@Override
  public Object @NotNull [] getVariants() {
    final PyImportElement importElement = PsiTreeUtil.getParentOfType(myElement, PyImportElement.class);
    // reference completion is useless in 'as' part of import statement (PY-2384)
    if (importElement != null && myElement == importElement.getAsNameElement()) {
      return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
    }
    PyClassPattern classPattern = getContainingClassPatternIfInAttributeNamePosition();
    if (classPattern != null) {
      TypeEvalContext context = TypeEvalContext.codeCompletion(myElement.getProject(), myElement.getContainingFile());
      return PyKeywordPatternReference.collectClassAttributeVariants(myElement, classPattern, context);
    }
    return super.getVariants();
  }
@Override
  public Object @NotNull [] getVariants()