code: def test_unset_constrained_param():
      """test 'unsetting' a constrained parameter by
      just setting `param.vary = True`
  
      """
      data = np.loadtxt(
          os.path.join(
              os.path.dirname(__file__),
              "..",
              "examples",
              "test_peak.dat",
          )
      )
      x = data[:, 0]
      y = data[:, 1]
  
      # initial fit
      mod = VoigtModel()
      params = mod.guess(y, x=x)
      out1 = mod.fit(y, params, x=x)
  
      assert out1.nvarys == 3
      assert out1.chisqr < 20.0
  
      # now just gamma to vary
      params["gamma"].vary = True
      out2 = mod.fit(y, params, x=x)
  
      assert out2.nvarys == 4
      assert out2.chisqr < out1.chisqr
      assert out2.rsquared > out1.rsquared
      assert out2.params["gamma"].correl["sigma"] < -0.6
  
imports: from copy import copy, deepcopy
  import os
  import pickle
  import numpy
  from numpy.testing import assert_allclose
  import pytest
  import lmfit
  from lmfit.models import VoigtModel
label_desc: Use image node_id 33 for calling a global function with example usage: test_unset_constrained_param() without return types