private boolean parseKeyValuePatternOrDoubleStarPattern() {
    if (parseDoubleStarPattern()) {
      consumeIllegalLeftoverExpressionTokens();
      return true;
    }
    // The grammar allows only literal or value patterns here, but for recovery purposes,
    // it's easier to match any pattern, as in dict literals, and then report illegal ones
    // in an annotator.
    SyntaxTreeBuilder.Marker mark = myBuilder.mark();
    if (parsePattern()) {
      if (!checkMatches(PyTokenTypes.COLON, PyParsingBundle.message("PARSE.expected.colon"))) {
        mark.drop();
        return true;
      }
      if (!parsePattern()) {
        myBuilder.error(PyParsingBundle.message("PARSE.expected.pattern"));
      }
      mark.done(PyElementTypes.KEY_VALUE_PATTERN);
      return true;
    }
    mark.drop();
    return false;
  }
private boolean parseKeyValuePatternOrDoubleStarPattern()