@ApiStatus.Internal
  public static <T extends PyAstElement> T @NotNull [] nodesToPsi(ASTNode[] nodes, T[] array) {
    T[] psiElements = ArrayUtil.newArray(ArrayUtil.getComponentType(array), nodes.length);
    for (int i = 0; i < nodes.length; i++) {
      //noinspection unchecked
      psiElements[i] = (T)nodes[i].getPsi();
    }
    return psiElements;
  }
@ApiStatus.Internal
  public static <T extends PyAstElement> T @NotNull [] nodesToPsi(ASTNode[] nodes, T[] array)