code: def _call_fitter(fitter, psf, x, y, data, weights):
      
  
      if np.all(weights == 1.):
          return fitter(psf, x, y, data)
      else:
          return fitter(psf, x, y, data, weights=weights)
docs: Not all fitters have to support a weight array. This function
      includes the weight in the fitter call only if really needed.