code: def test_load_v2():
      path = tests.frontend.modules.get_test_resources_directory(
          "calculatestatistics/v2.pipeline"
      )
      with open(path, "r") as fd:
          data = fd.read()
  
      pipeline = cellprofiler_core.pipeline.Pipeline()
  
      def callback(caller, event):
          assert not isinstance(
              event, cellprofiler_core.pipeline.event.LoadException
          )
  
      pipeline.add_listener(callback)
      pipeline.load(six.moves.StringIO(data))
      assert len(pipeline.modules()) == 1
      module = pipeline.modules()[0]
      assert isinstance(
          module,
          cellprofiler.modules.calculatestatistics.CalculateStatistics,
      )
      assert module.grouping_values == "Metadata_Controls"
      assert len(module.dose_values) == 1
      dv = module.dose_values[0]
      assert dv.measurement == "Metadata_SBS_Doses"
      assert not dv.log_transform
      assert dv.wants_save_figure
      assert dv.figure_name == "DoseResponsePlot"
      assert (
          dv.pathname.dir_choice
          == cellprofiler_core.preferences.DEFAULT_OUTPUT_FOLDER_NAME
      )
      assert dv.pathname.custom_path == "Test"
  
file_path: CellProfiler/tests/frontend/modules/test_calculatestatistics.py
imports: import os
  import tempfile
  import numpy
  import six.moves
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.calculatestatistics
  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 1 for calling a global function with example usage: test_load_v2() without return types