@Override
  @Nullable
  default PyAstClass getContainingClass() {
    final PsiElement parent = PsiTreeUtil.getParentOfType(this, StubBasedPsiElement.class);
    if (parent instanceof PyAstClass) {
      return (PyAstClass)parent;
    }
    return null;
  }
@Override
  @Nullable
  default PyAstClass getContainingClass()