code: def test_report_fit(fitresult, capsys):
      """Verify that the fit report is printed when using report_fit."""
      # report_fit with MinimizerResult/ModelResult as argument gives full
      # output of fitting results (except for [[Model]])
      report_fit(fitresult)
      report_headers = [
          "[[Fit Statistics]]",
          "[[Variables]]",
          "[[Correlations]] (unreported correlations are < 0.100)",
      ]
      captured = capsys.readouterr()
      for header in report_headers:
          assert header in captured.out
  
      # report_fit with Parameter set as argument gives [[Variables]] and
      # [[Correlations]]
      report_fit(fitresult)
      report_headers = [
          "[[Variables]]",
          "[[Correlations]] (unreported correlations are < 0.100)",
      ]
      captured = capsys.readouterr()
      for header in report_headers:
          assert header in captured.out
  
imports: import numpy
  import pytest
  import lmfit
  from lmfit import Minimizer, Parameters, ci_report, conf_interval, fit_report, report_ci, report_fit
  from lmfit.lineshapes import gaussian
  from lmfit.models import GaussianModel
  from lmfit.printfuncs import alphanumeric_sort, correl_table, fitreport_html_table, getfloat_attr, gformat
label_desc: Use image node_id 14 for calling a global function with example usage: test_report_fit(fitresult, capsys) without return types