code: def checkgrad(self, verbose=0, step=1e-6, tolerance=1e-3, df_tolerance=1e-12):
          
          # Make sure we always call the gradcheck on the highest parent
          # This ensures the assumption of the highest parent to hold the fixes
          # In the checkgrad function we take advantage of that, so it needs
          # to be set in place here.
          if self.has_parent():
              return self._highest_parent_._checkgrad(self, verbose=verbose, step=step, tolerance=tolerance, df_tolerance=df_tolerance)
          return self._checkgrad(self, verbose=verbose, step=step, tolerance=tolerance, df_tolerance=df_tolerance)
docs: Check the gradient of this parameter with respect to the highest parent's
          objective function.
          This is a three point estimate of the gradient, wiggling at the parameters
          with a stepsize step.
          The check passes if either the ratio or the difference between numerical and
          analytical gradient is smaller then tolerance.
  
          :param bool verbose: whether each parameter shall be checked individually.
          :param float step: the stepsize for the numerical three point gradient estimate.
          :param float tolerance: the tolerance for the gradient ratio or difference.
          :param float df_tolerance: the tolerance for df_tolerance
  
          .. note::
             The *dF_ratio* indicates the limit of accuracy of numerical gradients.
             If it is too small, e.g., smaller than 1e-12, the numerical gradients
             are usually not accurate enough for the tests (shown with blue).