code: def test_positive_ave_object_measurement():
      for case in ("minimum", "maximum"):
          module, workspace = make_workspace([], [[0.1, 0.2, 0.3, 0.4]])
          flag = module.flags[0]
          assert isinstance(
              flag, cellprofiler_core.setting.SettingsGroup
          )
          measurement = flag.measurement_settings[0]
          assert isinstance(
              measurement, cellprofiler_core.setting.SettingsGroup
          )
          measurement.source_choice.value = (
              cellprofiler.modules.flagimage.S_AVERAGE_OBJECT
          )
          measurement.object_name.value = OBJECT_NAME
          measurement.measurement.value = object_measurement_name(0)
          if case == "minimum":
              measurement.wants_maximum.value = False
              measurement.wants_minimum.value = True
              measurement.minimum_value.value = 0.3
          else:
              measurement.wants_minimum.value = False
              measurement.wants_maximum.value = True
              measurement.maximum_value.value = 0.2
          module.run(workspace)
          m = workspace.measurements
          assert isinstance(
              m, cellprofiler_core.measurement.Measurements
          )
          assert MEASUREMENT_NAME in m.get_feature_names("Image")
          assert m.get_current_image_measurement(MEASUREMENT_NAME) == 1
  
imports: import contextlib
  import os
  import tempfile
  import numpy
  import pytest
  import six.moves
  from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.constants.workspace import DISPOSITION_CONTINUE, DISPOSITION_SKIP
  import tests.frontend.modules
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  import cellprofiler.modules.flagimage
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.setting
  import cellprofiler_core.workspace
  from .None import test_filterobjects
label_desc: Use image node_id 11 for calling a global function with example usage: test_positive_ave_object_measurement() without return types