code: def test_load_xml_params():
      file = tests.frontend.modules.get_test_resources_directory(
          "untangleworms/parameters.xml"
      )
      with open(file, "r") as fd:
          data = fd.read()
      data = data.encode()
      workspace, module = make_workspace(
          numpy.zeros((10, 10), bool), data, write_mode="w"
      )
      assert isinstance(
          module, cellprofiler.modules.untangleworms.UntangleWorms
      )
      module.prepare_group(workspace, None, None)
      params = module.read_params()
      assert params.version == 10680
      assert round(abs(params.min_worm_area - 596.898), 7) == 0
      assert round(abs(params.max_area - 1183), 7) == 0
      assert round(abs(params.cost_threshold - 100), 7) == 0
      assert params.num_control_points == 21
      assert round(abs(params.max_skel_length - 158.038188951), 7) == 0
      assert round(abs(params.min_path_length - 76.7075694196), 7) == 0
      assert round(abs(params.max_path_length - 173.842007846), 7) == 0
      assert round(abs(params.median_worm_area - 1006.0), 7) == 0
      assert round(abs(params.max_radius - 5.07108224265), 7) == 0
      assert params.overlap_weight == 5
      assert params.leftover_weight == 10
      expected = numpy.array(
          [
              -0.010999071156,
              -0.011369928253,
              -0.0063572663907,
              -0.00537369691481,
              -0.00491960423727,
              -0.00888319810452,
              0.000958176954014,
              -0.00329354759164,
              -0.00182154382306,
              -0.00252850541515,
              0.00583731052007,
              -0.00629326705054,
              -0.000221502806058,
              0.000541997532415,
              7.10858314614e-05,
              -0.000536334650268,
              0.00846699296415,
              0.00229934152116,
              0.013315157629,
              127.475166584,
          ]
      )
      numpy.testing.assert_almost_equal(expected, params.mean_angles)
      expected = numpy.array(
          [
              1.42515381896,
              2.85816813675,
              3.625274645,
              4.0753094944,
              4.35612078737,
              4.52117778419,
              4.63350649815,
              4.68616131779,
              4.72754363339,
              4.7538931664,
              4.74523602328,
              4.73738576257,
              4.71422245337,
              4.67997686977,
              4.63299502256,
              4.54769060478,
              4.37493539203,
              4.10516708918,
              3.6478380576,
              2.87519387935,
              1.41510654664,
          ]
      )
      numpy.testing.assert_almost_equal(
          expected, params.radii_from_training
      )
      expected = numpy.array(
          [
              [
                  14.4160767437,
                  -3.62948521476,
                  -5.54563467306,
                  -2.03727846881,
                  1.28497735663,
                  1.69152924813,
                  0.155723103489,
                  0.0968570278119,
                  -0.830941512378,
                  -0.212837030458,
                  0.343854099462,
                  0.541856348331,
                  0.0113083798588,
                  -0.526926108341,
                  0.499035732802,
                  -0.714281934407,
                  0.407365302927,
                  0.0412386837587,
                  0.399436023924,
                  0.0100796538444,
              ],
              [
                  -3.62948521476,
                  28.3822272923,
                  -5.69796350599,
                  -12.8940771298,
                  -3.24074903822,
                  6.60066559736,
                  4.7027587735,
                  -0.228375351756,
                  -0.93975886278,
                  -0.404133419773,
                  0.461061138309,
                  -0.620175812393,
                  0.426458145116,
                  0.242860102398,
                  -1.395472436,
                  -0.416345646399,
                  -0.744042489471,
                  1.2607667493,
                  0.0266160618793,
                  0.0125632227269,
              ],
              [
                  -5.54563467306,
                  -5.69796350599,
                  33.965523631,
                  -2.5184071008,
                  -11.9739358904,
                  -5.55211501206,
                  1.54963332447,
                  1.51853522595,
                  2.94238214784,
                  1.58963458609,
                  -1.09690230963,
                  -3.03348214943,
                  -0.499685304962,
                  0.0832942797245,
                  2.64055890507,
                  1.47285696771,
                  -0.837591498704,
                  -1.32897383529,
                  -0.0909573472139,
                  -0.00747385975607,
              ],
              [
                  -2.03727846881,
                  -12.8940771298,
                  -2.5184071008,
                  38.910896265,
                  -0.501289252952,
                  -16.9651461757,
                  -8.5206491768,
                  0.599043361039,
                  4.0425703374,
                  3.46803482473,
                  1.5750544267,
                  0.828548143764,
                  -0.468487536336,
                  1.18597661827,
                  0.798189409259,
                  0.862661371456,
                  -0.14246505168,
                  -1.3841655628,
                  0.236725547536,
                  -0.0163619841363,
              ],
              [
                  1.28497735663,
                  -3.24074903822,
                  -11.9739358904,
                  -0.501289252952,
                  50.690805239,
                  -2.50730714299,
                  -19.7892493084,
                  -8.70870454399,
                  0.544130042179,
                  3.96597772445,
                  4.72570280412,
                  2.85472249374,
                  -2.84084610444,
                  -4.25238476559,
                  -1.41656624794,
                  2.35443215524,
                  1.26857012684,
                  -0.0117059492945,
                  0.193085174503,
                  -0.0128948234117,
              ],
              [
                  1.69152924813,
                  6.60066559736,
                  -5.55211501206,
                  -16.9651461757,
                  -2.50730714299,
                  49.7744788862,
                  2.21292071874,
                  -18.9379120677,
                  -11.6040186403,
                  -0.650553765753,
                  3.61258885051,
                  2.19212295163,
                  -0.250008762357,
                  -2.6870585839,
                  -1.82043770689,
                  0.109737469347,
                  0.560938864345,
                  0.219973313189,
                  -0.590133590346,
                  -0.00967309489576,
              ],
              [
                  0.155723103489,
                  4.7027587735,
                  1.54963332447,
                  -8.5206491768,
                  -19.7892493084,
                  2.21292071874,
                  51.0843827257,
                  0.934339159637,
                  -16.1389407803,
                  -13.597573567,
                  -1.54861446638,
                  3.38169064096,
                  4.06874131702,
                  -0.827598209967,
                  0.403883540178,
                  -2.06739129329,
                  -2.88536104019,
                  1.06444751058,
                  0.425819183522,
                  0.0218279774716,
              ],
              [
                  0.0968570278119,
                  -0.228375351756,
                  1.51853522595,
                  0.599043361039,
                  -8.70870454399,
                  -18.9379120677,
                  0.934339159637,
                  53.1553410056,
                  3.83284330941,
                  -21.8128767252,
                  -12.4239738428,
                  -0.689818407647,
                  4.93635164952,
                  4.04304737017,
                  1.11729234765,
                  -0.61148362918,
                  -1.50162558801,
                  -1.61722109339,
                  0.491305564623,
                  0.00813673085389,
              ],
              [
                  -0.830941512378,
                  -0.93975886278,
                  2.94238214784,
                  4.0425703374,
                  0.544130042179,
                  -11.6040186403,
                  -16.1389407803,
                  3.83284330941,
                  47.6933352778,
                  1.02465850736,
                  -18.704856196,
                  -9.30970873094,
                  1.7845053387,
                  2.83710840227,
                  3.85412837972,
                  -0.420823216821,
                  1.56974432254,
                  -0.212411753395,
                  -0.638990283092,
                  -0.00117994378546,
              ],
              [
                  -0.212837030458,
                  -0.404133419773,
                  1.58963458609,
                  3.46803482473,
                  3.96597772445,
                  -0.650553765753,
                  -13.597573567,
                  -21.8128767252,
                  1.02465850736,
                  55.2260388503,
                  4.35803059752,
                  -17.4350070993,
                  -9.9394563068,
                  0.592362874638,
                  4.03037893175,
                  0.749631051365,
                  0.179619159884,
                  1.09520337409,
                  0.198303530561,
                  -0.0128674812863,
              ],
              [
                  0.343854099462,
                  0.461061138309,
                  -1.09690230963,
                  1.5750544267,
                  4.72570280412,
                  3.61258885051,
                  -1.54861446638,
                  -12.4239738428,
                  -18.704856196,
                  4.35803059752,
                  51.04055356,
                  3.08936728044,
                  -17.5902587966,
                  -10.8714973146,
                  -0.045009571053,
                  4.87264332876,
                  1.30470158026,
                  -0.320349338202,
                  0.55323063623,
                  -0.00361862544014,
              ],
              [
                  0.541856348331,
                  -0.620175812393,
                  -3.03348214943,
                  0.828548143764,
                  2.85472249374,
                  2.19212295163,
                  3.38169064096,
                  -0.689818407647,
                  -9.30970873094,
                  -17.4350070993,
                  3.08936728044,
                  47.4661853593,
                  -1.87723439855,
                  -15.2700084763,
                  -7.6273108814,
                  4.14811581054,
                  1.42240471385,
                  0.0505728359147,
                  -0.0106613679324,
                  -0.000211505765068,
              ],
              [
                  0.0113083798588,
                  0.426458145116,
                  -0.499685304962,
                  -0.468487536336,
                  -2.84084610444,
                  -0.250008762357,
                  4.06874131702,
                  4.93635164952,
                  1.7845053387,
                  -9.9394563068,
                  -17.5902587966,
                  -1.87723439855,
                  47.8240218251,
                  2.57791664619,
                  -14.5709240372,
                  -4.78007676552,
                  1.87167780269,
                  0.359928009336,
                  -1.18561757081,
                  0.014074799611,
              ],
              [
                  -0.526926108341,
                  0.242860102398,
                  0.0832942797245,
                  1.18597661827,
                  -4.25238476559,
                  -2.6870585839,
                  -0.827598209967,
                  4.04304737017,
                  2.83710840227,
                  0.592362874638,
                  -10.8714973146,
                  -15.2700084763,
                  2.57791664619,
                  46.696159054,
                  -4.74906899066,
                  -15.6278488145,
                  -4.24795289841,
                  2.87455853452,
                  3.07635737509,
                  0.00532906905096,
              ],
              [
                  0.499035732802,
                  -1.395472436,
                  2.64055890507,
                  0.798189409259,
                  -1.41656624794,
                  -1.82043770689,
                  0.403883540178,
                  1.11729234765,
                  3.85412837972,
                  4.03037893175,
                  -0.045009571053,
                  -7.6273108814,
                  -14.5709240372,
                  -4.74906899066,
                  40.1689374127,
                  -3.67980915371,
                  -10.3797521361,
                  -0.841069955948,
                  3.27779133415,
                  0.0045492369767,
              ],
              [
                  -0.714281934407,
                  -0.416345646399,
                  1.47285696771,
                  0.862661371456,
                  2.35443215524,
                  0.109737469347,
                  -2.06739129329,
                  -0.61148362918,
                  -0.420823216821,
                  0.749631051365,
                  4.87264332876,
                  4.14811581054,
                  -4.78007676552,
                  -15.6278488145,
                  -3.67980915371,
                  37.0559195085,
                  -1.42897044519,
                  -7.88598395567,
                  -1.9964210551,
                  -0.0047454750271,
              ],
              [
                  0.407365302927,
                  -0.744042489471,
                  -0.837591498704,
                  -0.14246505168,
                  1.26857012684,
                  0.560938864345,
                  -2.88536104019,
                  -1.50162558801,
                  1.56974432254,
                  0.179619159884,
                  1.30470158026,
                  1.42240471385,
                  1.87167780269,
                  -4.24795289841,
                  -10.3797521361,
                  -1.42897044519,
                  31.0878364175,
                  -3.67706594057,
                  -7.74307062767,
                  -0.0186367239616,
              ],
              [
                  0.0412386837587,
                  1.2607667493,
                  -1.32897383529,
                  -1.3841655628,
                  -0.0117059492945,
                  0.219973313189,
                  1.06444751058,
                  -1.61722109339,
                  -0.212411753395,
                  1.09520337409,
                  -0.320349338202,
                  0.0505728359147,
                  0.359928009336,
                  2.87455853452,
                  -0.841069955948,
                  -7.88598395567,
                  -3.67706594057,
                  17.6561215842,
                  -0.53359878584,
                  0.00910717515256,
              ],
              [
                  0.399436023924,
                  0.0266160618793,
                  -0.0909573472139,
                  0.236725547536,
                  0.193085174503,
                  -0.590133590346,
                  0.425819183522,
                  0.491305564623,
                  -0.638990283092,
                  0.198303530561,
                  0.55323063623,
                  -0.0106613679324,
                  -1.18561757081,
                  3.07635737509,
                  3.27779133415,
                  -1.9964210551,
                  -7.74307062767,
                  -0.53359878584,
                  13.2416621872,
                  0.00936896857131,
              ],
              [
                  0.0100796538444,
                  0.0125632227269,
                  -0.00747385975607,
                  -0.0163619841363,
                  -0.0128948234117,
                  -0.00967309489576,
                  0.0218279774715,
                  0.00813673085389,
                  -0.00117994378545,
                  -0.0128674812862,
                  -0.00361862544014,
                  -0.000211505765068,
                  0.014074799611,
                  0.00532906905096,
                  0.0045492369767,
                  -0.0047454750271,
                  -0.0186367239616,
                  0.00910717515256,
                  0.00936896857131,
                  0.00505367806039,
              ],
          ]
      )
      numpy.testing.assert_almost_equal(
          expected, params.inv_angles_covariance_matrix
      )
  
imports: import base64
  import io
  import os
  import tempfile
  import zlib
  import imageio
  import centrosome.outline
  import numpy
  import scipy.ndimage
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler_core.modules
  import cellprofiler.modules.untangleworms
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 6 for calling a global function with example usage: test_load_xml_params() without return types