code: def run_intensity_measurement(self, image_name, workspace):
      image = workspace.image_set.get_image(
          image_name, must_be_grayscale=True
      )
      pixels = image.pixel_data
      if image.has_mask:
          pixels = pixels[image.mask]
  
      volumetric = workspace.pipeline.volumetric()
      area_text, area_measurement = (
          ("Volume", F_TOTAL_VOLUME)
          if volumetric
          else ("Area", F_TOTAL_AREA)
      )
  
      pixel_count = numpy.product(pixels.shape)
      if pixel_count == 0:
          pixel_sum = 0
          pixel_mean = 0
          pixel_std = 0
          pixel_mad = 0
          pixel_median = 0
          pixel_min = 0
          pixel_max = 0
      else:
          pixel_sum = numpy.sum(pixels)
          pixel_mean = pixel_sum / float(pixel_count)
          pixel_std = numpy.std(pixels)
          pixel_median = numpy.median(pixels)
          pixel_mad = numpy.median(numpy.abs(pixels - pixel_median))
          pixel_min = numpy.min(pixels)
          pixel_max = numpy.max(pixels)
  
      m = workspace.measurements
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, area_measurement, image_name)),
          pixel_count,
      )
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, F_TOTAL_INTENSITY, image_name)),
          pixel_sum,
      )
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, F_MEAN_INTENSITY, image_name)),
          pixel_mean,
      )
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, F_MEDIAN_INTENSITY, image_name)),
          pixel_median,
      )
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, F_STD_INTENSITY, image_name)),
          pixel_std,
      )
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, F_MAD_INTENSITY, image_name)),
          pixel_mad,
      )
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, F_MAX_INTENSITY, image_name)),
          pixel_max,
      )
      m.add_image_measurement(
          "_".join((C_IMAGE_QUALITY, F_MIN_INTENSITY, image_name)),
          pixel_min,
      )
  
      result = [
          [
              "{} {}".format(image_name, feature_name),
              "{:.2f}".format(value),
          ]
          for feature_name, value in (
              ("Total intensity", pixel_sum),
              ("Mean intensity", pixel_mean),
              ("Median intensity", pixel_median),
              ("Std intensity", pixel_std),
              ("MAD intensity", pixel_mad),
              ("Min intensity", pixel_min),
              ("Max intensity", pixel_max),
              ("Total {}".format(area_text), pixel_count),
          )
      ]
      return result
  
imports: import itertools
  import logging
  import cellprofiler_core.utilities.image
  import centrosome.cpmorphology
  import centrosome.haralick
  import centrosome.radial_power_spectrum
  import centrosome.threshold
  import centrosome.threshold
  import numpy
  import scipy.linalg.basic
  import scipy.ndimage
  from cellprofiler_core.constants.image import C_SCALING
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT, EXPERIMENT, MCA_AVAILABLE_POST_RUN
  from cellprofiler_core.constants.module._identify import O_WEIGHTED_VARIANCE, O_ENTROPY, O_FOREGROUND, O_BACKGROUND
  from cellprofiler_core.module import Module
  from cellprofiler_core.preferences import get_headless
  from cellprofiler_core.setting import Divider, HiddenCount, SettingsGroup, Binary, ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.subscriber import ImageListSubscriber
  from cellprofiler_core.setting.text import ImageName, Integer, Float
  from cellprofiler.modules.threshold import O_THREE_CLASS, O_TWO_CLASS
label_desc: Use image node_id 32 for calling the MeasureImageQuality obj's underlying member method code with example usage: obj.run_intensity_measurement(image_name, workspace) and returns: result