docs: protected static INDArray rebuildUpdaterStateArray(INDArray origUpdaterState, List<UpdaterBlock> orig, List<UpdaterBlock> newUpdater){
          if(origUpdaterState == null)
              return origUpdaterState;
  
          //First: check if there has been any change in the updater blocks to warrant rearranging the updater state view array
          if(orig.size() == newUpdater.size()){
              boolean allEq = true;
              for( int i=0; i<orig.size(); i++ ){
                  UpdaterBlock ub1 = orig.get(i);
                  UpdaterBlock ub2 = newUpdater.get(i);
                  if(!ub1.getLayersAndVariablesInBlock().equals(ub2.getLayersAndVariablesInBlock())){
                      allEq = false;
                      break;
                  }
              }
              if(allEq){
                  return origUpdaterState;
              }
          }
  
          Map<String,List<INDArray>> stateViewsPerParam = new HashMap<>();
          for(UpdaterBlock ub : orig){
              List<UpdaterBlock.ParamState> params = ub.getLayersAndVariablesInBlock();
              int blockPStart = ub.getParamOffsetStart();
              int blockPEnd = ub.getParamOffsetEnd();
  
              int blockUStart = ub.getUpdaterViewOffsetStart();
              int blockUEnd = ub.getUpdaterViewOffsetEnd();
  
              int paramsMultiplier = (blockUEnd-blockUStart)/(blockPEnd-blockPStart);     //Updater state length should be exactly 0, 1, 2 or 3x number of params
  
              INDArray updaterView = ub.getUpdaterView();
              long nParamsInBlock = blockPEnd - blockPStart;
  
              long soFar = 0;
              for( int sub=0; sub<paramsMultiplier; sub++) {
                  //subsetUpdaterView: [m0, m1, m2] etc
                  INDArray subsetUpdaterView = updaterView.get(NDArrayIndex.interval(0, 0, true), NDArrayIndex.interval(soFar, soFar + nParamsInBlock));
  
                  long offsetWithinSub = 0;
                  for (UpdaterBlock.ParamState ps : params) {
                      int idx = getId(ps.getLayer());
                      String paramName = idx + "_" + ps.getParamName();
                      INDArray pv = ps.getParamView();
                      long nParamsThisParam = pv.length();
  
                      INDArray currSplit = subsetUpdaterView.get(NDArrayIndex.interval(0, 0, true), NDArrayIndex.interval(offsetWithinSub, offsetWithinSub + nParamsThisParam));
                      if(!stateViewsPerParam.containsKey(paramName))
                          stateViewsPerParam.put(paramName, new ArrayList<INDArray>());
                      stateViewsPerParam.get(paramName).add(currSplit);
                      offsetWithinSub += nParamsThisParam;
                  }
  
                  soFar += nParamsInBlock;
              }
          }
  
          //Now that we've got updater state per param, we need to reconstruct it in an order suitable for the new updater blocks...
          List<INDArray> toConcat = new ArrayList<>();
          for(UpdaterBlock ub : newUpdater){
              List<UpdaterBlock.ParamState> ps = ub.getLayersAndVariablesInBlock();
              int idx = getId(ps.get(0).getLayer());
              String firstParam = idx + "_" + ps.get(0).getParamName();
              int size = stateViewsPerParam.get(firstParam).size();
              //For multiple params in the one block, we want to order like [a0, b0, c0][a1,b1,c1]
              for( int i=0; i<size; i++ ){
                  for(UpdaterBlock.ParamState p : ps) {
                      idx = getId(p.getLayer());
                      String paramName = idx + "_" + p.getParamName();
                      INDArray arr = stateViewsPerParam.get(paramName).get(i);
                      toConcat.add(arr);
                  }
              }
          }
          INDArray newUpdaterState = Nd4j.hstack(toConcat);
          Preconditions.checkState(newUpdaterState.rank() == 2, "Expected rank 2");
          Preconditions.checkState(origUpdaterState.length() == newUpdaterState.length(), "Updater state array lengths should be equal: got %s s. %s",
                  origUpdaterState.length(), newUpdaterState.length());
          return newUpdaterState;
      }