docs: public static int[] getBroadcastDimensions(int[] left,int[] right) {
          if(Arrays.equals(left,right))
              return null;
  
          int n = Math.min(left.length,right.length);
          List<Integer> dims = new ArrayList<>();
          int leftIdx = left.length - 1;
          int rightIdx = right.length - 1;
          for(int i = n - 1; i >= 0; i--) {
              if(left[leftIdx] != right[rightIdx] && right[rightIdx] == 1 || left[leftIdx] == 1) {
                  dims.add(i);
              }
              else if(left[leftIdx] != right[rightIdx]) {
                  throw new IllegalArgumentException("Unable to broadcast dimension " + i + " due to shape mismatch. Right shape must be 1. "
                          + "Left array shape: " + Arrays.toString(left) + ", right array shape: " + Arrays.toString(right));
              }
  
              leftIdx--;
              rightIdx--;
          }
  
          Collections.reverse(dims);
          return Ints.toArray(dims);
      }