code: def test_form_argument_thermal_distribution(form):
      """Test 'form' argument for thermal_distribution function."""
      xvals = np.linspace(0, 10, 100)
  
      func = lmfit.lineshapes.thermal_distribution
      sig = inspect.signature(lmfit.lineshapes.thermal_distribution)
  
      fnc_args = [xvals]
      for par in [
          par_name
          for par_name in sig.parameters.keys()
          if par_name != "x"
      ]:
          if par == "form":
              fnc_args.append(form)
          else:
              fnc_args.append(sig.parameters[par].default)
  
      if form == "unknown":
          msg = r"Invalid value .* for argument .*; should be one of .*"
          with pytest.raises(ValueError, match=msg):
              func(*fnc_args)
      else:
          fnc_output = func(*fnc_args)
          assert len(fnc_output) == len(xvals)
  
file_path: lmfit-py/tests/test_lineshapes.py
imports: import inspect
  import numpy
  from numpy.testing import assert_almost_equal
  import pytest
  import lmfit
  from lmfit.lineshapes import not_zero, tiny
label_desc: Use image node_id 6 for calling a global function with example usage: test_form_argument_thermal_distribution(form) without return types