@Nullable
  public static PyTypeDeclarationStatement getStatementByTarget(@NotNull PsiElement element) {
    final PyTypeDeclarationStatement statement = as(element.getParent(), PyTypeDeclarationStatement.class);
    return statement != null && statement.getTarget() == element ? statement : null;
  }
@Nullable
  public static PyTypeDeclarationStatement getStatementByTarget(@NotNull PsiElement element)