docs: public void resolveVariablesWith(Map<String, INDArray> arrays) {
          for (Map.Entry<String,INDArray> e : arrays.entrySet()) {
              SDVariable varForName = getVariable(e.getKey());
              if (varForName == null) {
                  throw new ND4JIllegalStateException("No variable name found for " + e.getKey());
              }
  
              Variable v = variables.get(e.getKey());
              if(varForName.getVariableType() == VariableType.PLACEHOLDER){
                  //Check shape:
                  long[] shape = varForName.placeholderShape();
                  long[] newShape = e.getValue().shape();
                  Preconditions.checkState(shape.length == newShape.length, "Placeholder shape not compatible (mismatched rank): placeholder \"%s\" " +
                          "shape %s, got incompatible shape %s", e.getKey(), shape, newShape);
              }
          }
  
  
          for (val entry : arrays.entrySet()) {
              if (!variables.get(entry.getKey()).getVariable().isPlaceHolder()) {
                  throw new ND4JIllegalStateException("Illegal variable " + entry.getKey() + " passed in. Variable found not to be a place holder variable");
              }
  
              val specifiedShape = getOriginalShapeForPlaceHolder(entry.getKey());
              //whole shape was specified: validate whether the input array shape is equal
              if (!Shape.isPlaceholderShape(specifiedShape)) {
                  if (!Shape.shapeEquals(specifiedShape, entry.getValue().shape())) {
                      throw new ND4JIllegalStateException("Place holder shape specified was " + Arrays.toString(specifiedShape) + " but array shape was " + Arrays.toString(entry.getValue().shape()));
                  }
              }
  
              associateArrayWithVariable(entry.getValue(), getVariable(entry.getKey()));
              setArrayForVariable(entry.getKey(), entry.getValue());
          }
  
          //declare resolved
          resolvedVariables = true;
      }