private static @NotNull PyInjectionUtil.InjectionResult registerCommentInjection(@NotNull MultiHostRegistrar registrar,
                                                                                   @NotNull PsiLanguageInjectionHost host) {
    final String text = host.getText();
    final String annotationText = getTypeCommentValue(text);
    if (annotationText != null) {
      final Language language;
      if (PyTypingTypeProvider.TYPE_IGNORE_PATTERN.matcher(text).matches()) {
        language = null;
      }
      else if (isFunctionTypeComment(host)) {
        language = PyFunctionTypeAnnotationDialect.INSTANCE;
      }
      else {
        language = PyTypeHintDialect.INSTANCE;
      }
      if (language != null) {
        registrar.startInjecting(language);
        //noinspection ConstantConditions
        registrar.addPlace("", "", host, getTypeCommentValueRange(text));
        registrar.doneInjecting();
        return new PyInjectionUtil.InjectionResult(true, true);
      }
    }
    return PyInjectionUtil.InjectionResult.EMPTY;
  }
private static @NotNull PyInjectionUtil.InjectionResult registerCommentInjection(@NotNull MultiHostRegistrar registrar,
                                                                                   @NotNull PsiLanguageInjectionHost host)