@Nullable
  private static PyClassType getClassType(@NotNull PyTypingNewTypeStub stub,
                                          @NotNull TypeEvalContext context,
                                          @NotNull PsiElement anchor) {
    final PyType type = Ref.deref(PyTypingTypeProvider.getStringBasedType(stub.getClassType(), anchor, context));
    final PyClassType result = PyUtil.as(type, PyClassType.class);
    if (result != null) {
      return PyUtil.as(result.toClass(), PyClassType.class);
    }
    return null;
  }
@Nullable
  private static PyClassType getClassType(@NotNull PyTypingNewTypeStub stub,
                                          @NotNull TypeEvalContext context,
                                          @NotNull PsiElement anchor)