code: def test_local_focus_score():
      """Test the local focus score by creating one deviant grid block
  
      Create one grid block out of four that has a uniform value. That one
      should have a focus score of zero. The others have a focus score of
      1/6, so the local focus score should be the variance of (1/6,1/6,1/6,0)
      divided by the median local norm variance (=1/6)
      """
      expected_value = numpy.var([1.0 / 6.0] * 3 + [0]) * 6.0
      numpy.random.seed(0)
      image = numpy.random.uniform(size=(1000, 1000))
      image[:500, :500] = 0.5
      workspace = make_workspace(image)
      q = workspace.module
      q.image_groups[0].check_blur.value = True
      q.image_groups[0].check_saturation.value = False
      q.image_groups[0].check_intensity.value = False
      q.image_groups[0].calculate_threshold.value = False
      q.image_groups[0].scale_groups[0].scale.value = 500
      q.run(workspace)
      m = workspace.measurements
      value = m.get_current_measurement(
          "Image", "ImageQuality_LocalFocusScore_my_image_500"
      )
      assert round(abs(value - expected_value), 3) == 0
  
imports: import io
  import centrosome.threshold
  import numpy
  import cellprofiler_core.image
  import cellprofiler_core.measurement
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, EXPERIMENT
  from cellprofiler_core.constants.module._identify import O_FOREGROUND, O_THREE_CLASS, O_WEIGHTED_VARIANCE, O_TWO_CLASS, O_ENTROPY, O_BACKGROUND
  import cellprofiler.modules.measureimagequality
  import cellprofiler_core.modules.namesandtypes
  import cellprofiler.modules.smooth
  import cellprofiler_core.object
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.frontend.modules
label_desc: Use image node_id 6 for calling a global function with example usage: test_local_focus_score() without return types