docstr: Trace of the smoothing matrix S(pen)
  
  TODO: addin a reference to Wahba, and whoever else I used.
docstr_tok: ["Trace","of","the","smoothing","matrix","S","(","pen",")","TODO",":","addin","a","reference","to","Wahba",",","and","whoever","else","I","used","."]
code: def trace(self):
      """
      Trace of the smoothing matrix S(pen)
  
      TODO: addin a reference to Wahba, and whoever else I used.
      """
  
      if self.pen > 0:
          _invband = _hbspline.invband(self.chol.copy())
          tr = _trace_symbanded(_invband, self.btb, lower=1)
          return tr
      else:
          return self.rank
  
imports: import numpy
  import numpy.linalg
  from scipy.linalg import solveh_banded
  from scipy.optimize import golden
  from models import _hbspline
  import warnings
label_desc: Use image node_id 6 for calling the SmoothingSpline obj's underlying member method code with example usage: obj.trace() and returns: tr, self