code: def test_emcee_reuse_sampler(self):
      if not HAS_EMCEE:
          return True
  
      self.mini.emcee(nwalkers=20, steps=25)
  
      # if you've run the sampler the Minimizer object should have a _lastpos
      # attribute
      assert hasattr(self.mini, "_lastpos")
  
      # now try and reuse sampler
      out2 = self.mini.emcee(steps=10, reuse_sampler=True)
      assert out2.chain.shape == (35, 20, 4)
  
      # you shouldn't be able to reuse the sampler if nvarys has changed.
      self.mini.params["amp"].vary = False
      pytest.raises(ValueError, self.mini.emcee, reuse_sampler=True)
  
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 14 for calling the CommonMinimizerTest obj's underlying member method code with example usage: obj.test_emcee_reuse_sampler() and returns: True