private static @NotNull PyPattern unwrapGroupAndAsPatterns(@NotNull PyPattern pattern) {
    if (pattern instanceof PyGroupPattern) {
      return unwrapGroupAndAsPatterns(((PyGroupPattern)pattern).getPattern());
    }
    if (pattern instanceof PyAsPattern) {
      return unwrapGroupAndAsPatterns(((PyAsPattern)pattern).getPattern());
    }
    return pattern;
  }
private static @NotNull PyPattern unwrapGroupAndAsPatterns(@NotNull PyPattern pattern)