code: public void setGradientForVariableName(String variableName, SDVariable variable) {
          Preconditions.checkState(variables.containsKey(variableName), "No variable exists with name \"%s\"", variableName);
          if (variable == null) {
              throw new ND4JIllegalStateException("Unable to set null gradient for variable name " + variableName);
          }
          variables.get(variableName).setGradient(variable);
      }
docs: Assign a SDVariable to represent the gradient of the SDVariable with the specified name
  
  @param variableName the variable name to assign the gradient variable for
  @param variable     the gradient variable