code: public String generateNewVarName(String baseName, int argIndex) {
          if (!variables.containsKey(baseName) && argIndex == 0) {
              return baseName;
          }
  
          //need to find a new name
          int count = 0;
          String name = baseName + (count == 0 ? "" : "_" + count) + (argIndex > 0 ? ":" + argIndex : "");
          while (getVariable(name) != null) {
              name = baseName + "_" + (++count) + (argIndex > 0 ? ":" + argIndex : "");
          }
  
          if (getVariable(name) != null) {
              throw new ND4JIllegalStateException("Converged on already generated variable!");
          }
          return name;
      }
docs: Generate a new variable name based on the uniqueness of the base name and arg index<br>
  For example, if baseName = "X" will return:<br>
  "X" if "X" does not already exist, or "X:argIndex" if argIndex > 0<br>
  "X_1" if "X" already exists, or "X_1:argIndex" if argIndex > 0<br>
  "X_2" if "X" and "X_1" already exists, or "X_2:argIndex" if argIndex > 0<br>
  And so on, until an unused name is found
  
  @param baseName the base name to use (use function.opName() where function is a {@link DifferentialFunction}
  @param argIndex the arg index
  @return the new generated name