code: public static INDArray lastIndex(INDArray array, Condition condition, int... dimension) {
          if (!(condition instanceof BaseCondition))
              throw new UnsupportedOperationException("Only static Conditions are supported");
  
          return Nd4j.getExecutioner().exec(new LastIndex(array, condition, dimension));
      }
docs: This method returns first index matching given condition along given dimensions
  
  PLEASE NOTE: This method will return -1 values for missing conditions
  
  @param array
  @param condition
  @param dimension
  @return