docs: public static long getOffset(IntBuffer shapeInformation, int dim0, int dim1, int dim2) {
          int rank = rank(shapeInformation);
          if (rank != 3)
              throw new IllegalArgumentException(
                      "Cannot use this getOffset method on arrays of rank != 3 (rank is: " + rank + ")");
          long offset = 0;
          int size_0 = size(shapeInformation, 0);
          int size_1 = size(shapeInformation, 1);
          int size_2 = size(shapeInformation, 2);
          if (dim0 >= size_0 || dim1 >= size_1 || dim2 >= size_2)
              throw new IllegalArgumentException("Invalid indices: cannot get [" + dim0 + "," + dim1 + "," + dim2
                      + "] from a " + Arrays.toString(shape(shapeInformation)) + " NDArray");
  
          if (size_0 != 1)
              offset += dim0 * stride(shapeInformation, 0);
          if (size_1 != 1)
              offset += dim1 * stride(shapeInformation, 1);
          if (size_2 != 1)
              offset += dim2 * stride(shapeInformation, 2);
  
          return offset;
      }