docs: public void addArgsFor(String[] variables, DifferentialFunction function) {
          if (function.getOwnName() == null)
              throw new ND4JIllegalStateException("Instance id can not be null. Function not initialized properly");
  
          //double check if function contains placeholder args
          for (val varName : variables) {
              if (isPlaceHolder(varName)) {
                  placeHolderFunctions.add(function.getOwnName());
              }
          }
  
          //Add function if it doesn't exist
          //TODO could "not existing" be a bug sometimes?
          if(!ops.containsKey(function.getOwnName())){
              ops.put(function.getOwnName(), SameDiffOp.builder().name(function.getOwnName()).op(function).build());
          }
  
          //Update variable 'inputs to op' accounting for repeated inputs (like y = x+x)
          ops.get(function.getOwnName()).setInputsToOp(Arrays.asList(variables));     //Duplicate variables OK/required here
  
          for (String variableName : variables) {
              List<String> funcs = this.variables.get(variableName).getInputsForOp();
              if (funcs == null) {
                  funcs = new ArrayList<>();
                  this.variables.get(variableName).setInputsForOp(funcs);
              }
              if(!funcs.contains(function.getOwnName()))  //Avoid duplicates for function names.
                  funcs.add(function.getOwnName());
          }
      }