code: def test_load_params():
      data = zlib.decompress(base64.b64decode(PARAMS))
      workspace, module = make_workspace(
          numpy.zeros((10, 10), bool), data
      )
      assert isinstance(
          module, cellprofiler.modules.untangleworms.UntangleWorms
      )
      module.prepare_group(workspace, None, None)
      params = module.read_params()
      assert round(abs(params.min_worm_area - 601.2), 0) == 0
      assert round(abs(params.max_area - 1188.5), 0) == 0
      assert round(abs(params.cost_threshold - 200.8174), 3) == 0
      assert params.num_control_points == 21
      numpy.testing.assert_almost_equal(
          params.mean_angles,
          numpy.array(
              [
                  -0.00527796256445404,
                  -0.0315202989978013,
                  -0.00811839821858939,
                  -0.0268318268190547,
                  -0.0120476701544335,
                  -0.0202651421433172,
                  -0.0182919505672029,
                  -0.00990476055380843,
                  -0.0184558846126189,
                  -0.0100827620455749,
                  -0.0121729201775023,
                  -0.0129790204861452,
                  0.0170195137830520,
                  0.00185471766328753,
                  0.00913261528049730,
                  -0.0106805477987750,
                  0.00473369321673608,
                  -0.00835547063778011,
                  -0.00382606935405797,
                  127.129708001680,
              ]
          ),
      )
      numpy.testing.assert_almost_equal(
          params.inv_angles_covariance_matrix,
          numpy.array(
              [
                  [
                      16.1831499639022,
                      -5.06131059821028,
                      -7.03307454602146,
                      -2.88853420387429,
                      3.34017866010302,
                      3.45512576204933,
                      -1.09841786238497,
                      -2.79348760430306,
                      -1.85931734891389,
                      -0.652858408126458,
                      -1.22752367898365,
                      4.15573185568687,
                      1.99443112453893,
                      -2.26823701209981,
                      -1.25144655688072,
                      0.321931535265876,
                      0.230928100005575,
                      1.47235070063732,
                      0.487902558505382,
                      -0.0240787101275336,
                  ],
                  [
                      -5.06131059821028,
                      25.7442868663138,
                      -7.04197641326958,
                      -13.5057449289369,
                      -2.23928687231578,
                      4.31232681113232,
                      6.56454500463435,
                      0.336556097291049,
                      0.175759837346977,
                      -2.77098858956934,
                      0.307050758321026,
                      -2.12899901988826,
                      1.32985035426604,
                      2.77299577778623,
                      6.03717697873141,
                      -2.84152938638523,
                      -2.50027246248360,
                      2.88188404703382,
                      -2.94724985136021,
                      -0.00349792622125952,
                  ],
                  [
                      -7.03307454602146,
                      -7.04197641326958,
                      34.8868022738369,
                      -2.41698367836302,
                      -11.9074612429652,
                      -5.03219465159153,
                      0.566581294377262,
                      4.65965515408864,
                      4.40918302814844,
                      2.12317351869194,
                      -1.29767770791342,
                      -4.66814018817306,
                      -1.18082874743096,
                      3.51827877502392,
                      2.85186107108145,
                      -1.26716616779540,
                      -1.09593786866014,
                      -2.32869644778286,
                      3.48194316456812,
                      0.0623642923643842,
                  ],
                  [
                      -2.88853420387429,
                      -13.5057449289369,
                      -2.41698367836302,
                      44.6605979566156,
                      0.348020753098590,
                      -17.3115366179766,
                      -12.7256060767026,
                      5.70440571321352,
                      6.41590904344264,
                      -0.304578996360776,
                      1.47801450095277,
                      -0.908814536484512,
                      -1.48164287245030,
                      -2.34708447702134,
                      -2.23115474987353,
                      2.88954249368066,
                      2.74733203099146,
                      -3.04745351430166,
                      2.86603729585242,
                      0.00665888346219492,
                  ],
                  [
                      3.34017866010302,
                      -2.23928687231578,
                      -11.9074612429652,
                      0.348020753098590,
                      46.4099158672193,
                      -3.25559842794185,
                      -21.3692910255085,
                      -10.0863357869636,
                      -1.88512464797353,
                      -5.09750253669453,
                      1.04201155533543,
                      9.59270554140012,
                      0.145271525356847,
                      -5.72994886885862,
                      -6.15723880027164,
                      1.88718468304502,
                      0.283089642962522,
                      1.66577561191334,
                      -3.04240109786268,
                      0.0462492758625229,
                  ],
                  [
                      3.45512576204933,
                      4.31232681113232,
                      -5.03219465159153,
                      -17.3115366179766,
                      -3.25559842794185,
                      57.1526341670534,
                      7.57995189380428,
                      -30.3232000529691,
                      -13.9152901068606,
                      1.20521891799049,
                      9.87949588048337,
                      10.3794242331984,
                      -4.19429285108215,
                      -9.73213279908661,
                      0.320110631214874,
                      4.02636261974896,
                      -1.45438578469807,
                      -2.11793646742091,
                      -1.21519495438964,
                      -0.00660397622823739,
                  ],
                  [
                      -1.09841786238497,
                      6.56454500463435,
                      0.566581294377262,
                      -12.7256060767026,
                      -21.3692910255085,
                      7.57995189380428,
                      55.2613391936066,
                      -6.13432369324871,
                      -20.0367084309419,
                      -4.90180311830919,
                      5.26313027293073,
                      1.43916280645744,
                      -0.336838408057983,
                      2.29636776603810,
                      5.18308930951763,
                      -1.98288423853561,
                      -2.53995069544169,
                      -1.21462394180208,
                      1.97319648119690,
                      -0.0627444956856546,
                  ],
                  [
                      -2.79348760430306,
                      0.336556097291049,
                      4.65965515408864,
                      5.70440571321352,
                      -10.0863357869636,
                      -30.3232000529691,
                      -6.13432369324871,
                      79.4076938002120,
                      11.3722618218994,
                      -26.1279088515910,
                      -18.2231695390128,
                      -2.67921008934274,
                      8.52472948160932,
                      3.40897885951299,
                      -0.0156673992253622,
                      0.391511866283792,
                      2.43961939136012,
                      -4.02463696447393,
                      1.21200189852376,
                      -0.0276025739334060,
                  ],
                  [
                      -1.85931734891389,
                      0.175759837346977,
                      4.40918302814844,
                      6.41590904344264,
                      -1.88512464797353,
                      -13.9152901068606,
                      -20.0367084309419,
                      11.3722618218994,
                      62.2896410297082,
                      -4.73903263913512,
                      -17.7829659347680,
                      -17.3704452255960,
                      -1.11146124458858,
                      2.69303406406718,
                      5.35251557583661,
                      7.57574529347207,
                      -2.24432157539803,
                      -1.01589845612927,
                      2.74166325038759,
                      0.00616263316699783,
                  ],
                  [
                      -0.652858408126458,
                      -2.77098858956934,
                      2.12317351869194,
                      -0.304578996360776,
                      -5.09750253669453,
                      1.20521891799049,
                      -4.90180311830919,
                      -26.1279088515910,
                      -4.73903263913512,
                      53.6045562587984,
                      1.49208866907909,
                      -18.7976123565674,
                      -15.3160914187456,
                      4.62369094805509,
                      6.25594149186720,
                      -1.86433478999824,
                      2.40465791383637,
                      0.860045694295453,
                      -5.03379983998103,
                      -0.00250271852621389,
                  ],
                  [
                      -1.22752367898365,
                      0.307050758321026,
                      -1.29767770791342,
                      1.47801450095277,
                      1.04201155533543,
                      9.87949588048337,
                      5.26313027293073,
                      -18.2231695390128,
                      -17.7829659347680,
                      1.49208866907909,
                      52.6257209831917,
                      4.12959322744854,
                      -12.4142184568466,
                      -9.82200985900629,
                      -3.97638811187418,
                      1.15423868070705,
                      6.11175904439983,
                      2.88103313127626,
                      -0.0202321884301434,
                      -0.0770486841949908,
                  ],
                  [
                      4.15573185568687,
                      -2.12899901988826,
                      -4.66814018817306,
                      -0.908814536484512,
                      9.59270554140012,
                      10.3794242331984,
                      1.43916280645744,
                      -2.67921008934274,
                      -17.3704452255960,
                      -18.7976123565674,
                      4.12959322744854,
                      59.4024702854915,
                      -0.643591318201096,
                      -17.8872119905991,
                      -14.6283664729331,
                      0.921599492881119,
                      0.898368585097109,
                      2.02174339844234,
                      1.40192545975918,
                      0.0866552397218132,
                  ],
                  [
                      1.99443112453893,
                      1.32985035426604,
                      -1.18082874743096,
                      -1.48164287245030,
                      0.145271525356847,
                      -4.19429285108215,
                      -0.336838408057983,
                      8.52472948160932,
                      -1.11146124458858,
                      -15.3160914187456,
                      -12.4142184568466,
                      -0.643591318201096,
                      51.7737313171135,
                      -2.98701120529969,
                      -20.1761854847240,
                      -5.56229914135487,
                      2.56729654359925,
                      1.84129317709747,
                      2.90488161640993,
                      -0.0294908776237644,
                  ],
                  [
                      -2.26823701209981,
                      2.77299577778623,
                      3.51827877502392,
                      -2.34708447702134,
                      -5.72994886885862,
                      -9.73213279908661,
                      2.29636776603810,
                      3.40897885951299,
                      2.69303406406718,
                      4.62369094805509,
                      -9.82200985900629,
                      -17.8872119905991,
                      -2.98701120529969,
                      38.7045301665171,
                      0.0132666292353374,
                      -12.2104685640281,
                      -4.94147299831573,
                      3.32199768047190,
                      -0.225506641087443,
                      0.0431435753786928,
                  ],
                  [
                      -1.25144655688072,
                      6.03717697873141,
                      2.85186107108145,
                      -2.23115474987353,
                      -6.15723880027164,
                      0.320110631214874,
                      5.18308930951763,
                      -0.0156673992253622,
                      5.35251557583661,
                      6.25594149186720,
                      -3.97638811187418,
                      -14.6283664729331,
                      -20.1761854847240,
                      0.0132666292353374,
                      50.0037711812637,
                      1.51067910097860,
                      -12.7274402250448,
                      -7.12911129084980,
                      2.74828112041922,
                      0.0251424008457656,
                  ],
                  [
                      0.321931535265876,
                      -2.84152938638523,
                      -1.26716616779540,
                      2.88954249368066,
                      1.88718468304502,
                      4.02636261974896,
                      -1.98288423853561,
                      0.391511866283792,
                      7.57574529347207,
                      -1.86433478999824,
                      1.15423868070705,
                      0.921599492881119,
                      -5.56229914135487,
                      -12.2104685640281,
                      1.51067910097860,
                      46.6921496750757,
                      -8.43566372164764,
                      -15.0997112563034,
                      3.65384550078426,
                      -0.00453606919854300,
                  ],
                  [
                      0.230928100005575,
                      -2.50027246248360,
                      -1.09593786866014,
                      2.74733203099146,
                      0.283089642962522,
                      -1.45438578469807,
                      -2.53995069544169,
                      2.43961939136012,
                      -2.24432157539803,
                      2.40465791383637,
                      6.11175904439983,
                      0.898368585097109,
                      2.56729654359925,
                      -4.94147299831573,
                      -12.7274402250448,
                      -8.43566372164764,
                      32.8028397335256,
                      -3.87691864187466,
                      -6.41814264219731,
                      -0.0905326089208310,
                  ],
                  [
                      1.47235070063732,
                      2.88188404703382,
                      -2.32869644778286,
                      -3.04745351430166,
                      1.66577561191334,
                      -2.11793646742091,
                      -1.21462394180208,
                      -4.02463696447393,
                      -1.01589845612927,
                      0.860045694295453,
                      2.88103313127626,
                      2.02174339844234,
                      1.84129317709747,
                      3.32199768047190,
                      -7.12911129084980,
                      -15.0997112563034,
                      -3.87691864187466,
                      28.0765623007788,
                      -8.07326731403660,
                      0.0228470307583052,
                  ],
                  [
                      0.487902558505382,
                      -2.94724985136021,
                      3.48194316456812,
                      2.86603729585242,
                      -3.04240109786268,
                      -1.21519495438964,
                      1.97319648119690,
                      1.21200189852376,
                      2.74166325038759,
                      -5.03379983998103,
                      -0.0202321884301434,
                      1.40192545975918,
                      2.90488161640993,
                      -0.225506641087443,
                      2.74828112041922,
                      3.65384550078426,
                      -6.41814264219731,
                      -8.07326731403660,
                      18.1513394317232,
                      0.0139561765245330,
                  ],
                  [
                      -0.0240787101275336,
                      -0.00349792622125952,
                      0.0623642923643842,
                      0.00665888346219492,
                      0.0462492758625229,
                      -0.00660397622823739,
                      -0.0627444956856546,
                      -0.0276025739334060,
                      0.00616263316699783,
                      -0.00250271852621389,
                      -0.0770486841949908,
                      0.0866552397218132,
                      -0.0294908776237644,
                      0.0431435753786928,
                      0.0251424008457656,
                      -0.00453606919854300,
                      -0.0905326089208310,
                      0.0228470307583052,
                      0.0139561765245330,
                      0.00759059668024605,
                  ],
              ]
          ),
      )
      assert round(abs(params.max_radius - 5.0990), 3) == 0
      assert round(abs(params.max_skel_length - 155.4545), 3) == 0
      assert (
          round(abs(params.min_path_length - 84.401680541266530), 7)
          == 0
      )
      assert (
          round(abs(params.max_path_length - 171.8155554421827), 7) == 0
      )
      assert round(abs(params.median_worm_area - 1007.5), 7) == 0
      assert round(abs(params.worm_radius - 5.099019527435303), 7) == 0
      assert params.overlap_weight == 5
      assert params.leftover_weight == 10
      numpy.testing.assert_almost_equal(
          params.radii_from_training,
          numpy.array(
              [
                  1.19132055711746,
                  2.75003945541382,
                  3.56039281511307,
                  4.05681743049622,
                  4.39353294944763,
                  4.52820824432373,
                  4.66245639991760,
                  4.75254730796814,
                  4.76993056106567,
                  4.78852712249756,
                  4.73509162521362,
                  4.76029792976379,
                  4.75030451583862,
                  4.69090248298645,
                  4.59827183151245,
                  4.55065062236786,
                  4.35989559841156,
                  4.10916972160339,
                  3.58363935613632,
                  2.83766316795349,
                  1.15910302543640,
              ]
          ),
      )
  
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 5 for calling a global function with example usage: test_load_params() without return types