docs: public void updateVariableName(String varName, String withName) {
          SDVariable oldVarNameRef = getVariable(varName);
          Variable v = variables.remove(varName);
          String oldVarName = varName;
          oldVarNameRef.setVarName(withName);
          v.setName(withName);
          variables.put(withName, v);
  
          for(SameDiffOp op : ops.values()){
              List<String> outputsOfOp = op.getOutputsOfOp();
              if(outputsOfOp != null && !outputsOfOp.isEmpty()) {
                  for (int i = 0; i < outputsOfOp.size(); i++) {
                      if (outputsOfOp.get(i).equals(oldVarName)) {
                          outputsOfOp.set(i, withName);
                      }
                  }
              }
  
              List<String> inputsToOp = op.getInputsToOp();
              if(inputsToOp != null && !inputsToOp.isEmpty()) {
                  for (int i = 0; i < inputsToOp.size(); i++) {
                      if (inputsToOp.get(i).equals(oldVarName)) {
                          inputsToOp.set(i, withName);
                      }
                  }
              }
          }
  
  //        if (variableNameToArr.containsKey(oldVarName)) {
  //            val arr = variableNameToArr.remove(oldVarName);
  //            variableNameToArr.put(withName, arr);
  //        }
  
  
          if (variableNameToShape.containsKey(oldVarName)) {
              val shape = variableNameToShape.remove(oldVarName);
              variableNameToShape.put(withName, shape);
          }
  
          if (forwardVarForGrad.containsKey(oldVarName)) {
              val forwardGrad = forwardVarForGrad.remove(oldVarName);
              forwardVarForGrad.put(withName, forwardGrad);
          }
  
  
          if (v.getInputsForOp() != null) {
              List<String> funcNames = v.getInputsForOp();
              for (String s : funcNames) {
                  DifferentialFunction func = ops.get(s).getOp();
                  if (func instanceof BaseOp) {
                      BaseOp baseOp = (BaseOp) func;
                      if (baseOp.getXVertexId() != null && baseOp.getXVertexId().equals(oldVarName)) {
                          baseOp.setXVertexId(withName);
                      }
  
                      if (baseOp.getYVertexId() != null && baseOp.getYVertexId().equals(oldVarName)) {
                          baseOp.setYVertexId(withName);
                      }
  
                      if (baseOp.getZVertexId() != null && baseOp.getZVertexId().equals(oldVarName)) {
                          baseOp.setZVertexId(withName);
                      }
  
                  }
              }
          }
  
  
          if (v.getOutputOfOp() != null) {
              DifferentialFunction func = ops.get(v.getOutputOfOp()).getOp();
              if (func instanceof BaseOp) {
                  BaseOp baseOp = (BaseOp) func;
                  if (baseOp.getXVertexId() != null && baseOp.getXVertexId().equals(oldVarName)) {
                      baseOp.setXVertexId(withName);
                  }
  
                  if (baseOp.getYVertexId() != null && baseOp.getYVertexId().equals(oldVarName)) {
                      baseOp.setYVertexId(withName);
                  }
  
                  if (baseOp.getZVertexId() != null && baseOp.getZVertexId().equals(oldVarName)) {
                      baseOp.setZVertexId(withName);
                  }
              }
          }
      }