code: def lmom_fit(self, data=[], lmom_ratios=[]):
          
          n_min = self.numargs + 2
          if len(data) > 0:
              if len(data) <= n_min:
                  raise ValueError("At least {} data points must be provided.".format(n_min))
              lmom_ratios = lm.lmom_ratios(data, nmom=n_min)
          elif not lmom_ratios:
              raise Exception("Either `data` or `lmom_ratios` must be provided.")
          elif len(lmom_ratios) < n_min:
              raise ValueError("At least {} number of L-moments must be provided.".format(n_min))
  
          return self._lmom_fit(lmom_ratios)
docs: Fit the distribution function to the given data or given L-moments.
  
          :param data: Data to use in calculating the distribution parameters
          :type data: array_like
          :param lmom_ratios: L-moments (ratios) l1, l2, t3, t4, .. to use in calculating the distribution parameters
          :type lmom_ratios: array_like
          :returns: Distribution parameters in `scipy` order, e.g. scale, loc, shape
          :rtype: :class:`OrderedDict`