private static boolean isTypingAnnotatedMetadataArgument(@NotNull PsiElement element,
                                                           @NotNull TypeEvalContext context) {
    final PyTupleExpression tuple = as(element.getParent(), PyTupleExpression.class);
    if (tuple == null) return false;
    final PySubscriptionExpression parent = as(tuple.getParent(), PySubscriptionExpression.class);
    if (parent == null) return false;

    final PyExpression operand = parent.getOperand();
    final Collection<String> resolvedNames = resolveToQualifiedNames(operand, context);
    if (resolvedNames.stream().anyMatch(name -> ANNOTATED.equals(name) || ANNOTATED_EXT.equals(name))) {
      return tuple.getElements()[0] != element;
    }
    return false;
  }
private static boolean isTypingAnnotatedMetadataArgument(@NotNull PsiElement element,
                                                           @NotNull TypeEvalContext context)