code: def momentcondunboundls(
      distfn, params, mom2, quantile=None, shape=None
  ):
      """moment conditions for estimating loc and scale of a distribution
      with method of moments using either 2 quantiles or 2 moments (not both).
  
      Returns
      -------
      difference : ndarray
          difference between theoretical and empirical moments or quantiles
  
      """
      loc, scale = params
      mom2diff = np.array(distfn.stats(shape, loc, scale)) - mom2
      if quantile is not None:
          pq, xq = quantile
          # ppfdiff = distfn.ppf(pq, alpha)
          cdfdiff = distfn.cdf(xq, shape, loc, scale) - pq
          # return np.concatenate([mom2diff, cdfdiff[:1]])
          return cdfdiff
      return mom2diff
  
file_path: statsmodels/statsmodels/sandbox/distributions/estimators.py
imports: import numpy
  from scipy import stats, optimize, special
label_desc: Use image node_id 4 for calling a global function with example usage: momentcondunboundls(distfn, params, mom2, quantile, shape) and returns: mom2diff, cdfdiff