code: def test_emcee_lnpost(self):
      # check ln likelihood is calculated correctly. It should be
      # -0.5 * chi**2.
      result = self.mini.minimize()
  
      # obtain the numeric values
      # note - in this example all the parameters are varied
      fvars = np.array([par.value for par in result.params.values()])
  
      # calculate the cost function with scaled values (parameters all have
      # lower and upper bounds.
      scaled_fvars = []
      for par, fvar in zip(result.params.values(), fvars):
          par.value = fvar
          scaled_fvars.append(par.setup_bounds())
  
      val = self.mini.penalty(np.array(scaled_fvars))
  
      # calculate the log-likelihood value
      bounds = np.array(
          [(par.min, par.max) for par in result.params.values()]
      )
  
      val2 = self.mini._lnprob(
          fvars,
          self.residual,
          result.params,
          result.var_names,
          bounds,
          userargs=(self.x, self.data),
      )
  
      assert_almost_equal(-0.5 * val, val2)
  
imports: import sys
  import unittest
  import numpy
  from numpy import pi
  from numpy.testing import assert_allclose, assert_almost_equal, assert_equal
  import pytest
  from scipy.optimize import rosen_der
  from uncertainties import ufloat
  from lmfit import Minimizer, Parameters, minimize
  from lmfit.lineshapes import gaussian
  from lmfit.minimizer import HAS_EMCEE, SCALAR_METHODS, MinimizerResult, coerce_float64
  from lmfit.models import SineModel
label_desc: Use image node_id 15 for calling the CommonMinimizerTest obj's underlying member method code with example usage: obj.test_emcee_lnpost() without return types