code: def run_one(self, image_name, object_name, scale, workspace):
      statistics = []
  
      image = workspace.image_set.get_image(
          image_name, must_be_grayscale=True
      )
  
      objects = workspace.get_objects(object_name)
      labels = objects.segmented
  
      gray_levels = int(self.gray_levels.value)
  
      unique_labels = numpy.unique(labels)
      if unique_labels[0] == 0:
          unique_labels = unique_labels[1:]
  
      n_directions = 13 if objects.volumetric else 4
  
      if len(unique_labels) == 0:
          for direction in range(n_directions):
              for feature_name in F_HARALICK:
                  statistics += self.record_measurement(
                      image=image_name,
                      feature=feature_name,
                      obj=object_name,
                      result=numpy.zeros((0,)),
                      scale="{:d}_{:02d}".format(scale, direction),
                      workspace=workspace,
                      gray_levels="{:d}".format(gray_levels),
                  )
  
          return statistics
  
      # IMG-961: Ensure image and objects have the same shape.
      try:
          mask = (
              image.mask
              if image.has_mask
              else numpy.ones_like(image.pixel_data, dtype=bool)
          )
          pixel_data = objects.crop_image_similarly(image.pixel_data)
      except ValueError:
          pixel_data, m1 = size_similarly(labels, image.pixel_data)
  
          if numpy.any(~m1):
              if image.has_mask:
                  mask, m2 = size_similarly(labels, image.mask)
                  mask[~m2] = False
              else:
                  mask = m1
  
      pixel_data[~mask] = 0
      # mahotas.features.haralick bricks itself when provided a dtype larger than uint8 (version 1.4.3)
      pixel_data = skimage.util.img_as_ubyte(pixel_data)
      if gray_levels != 256:
          pixel_data = skimage.exposure.rescale_intensity(
              pixel_data,
              in_range=(0, 255),
              out_range=(0, gray_levels - 1),
          ).astype(numpy.uint8)
      props = skimage.measure.regionprops(labels, pixel_data)
  
      features = numpy.empty((n_directions, 13, len(unique_labels)))
  
      for index, prop in enumerate(props):
          label_data = prop["intensity_image"]
          try:
              features[:, :, index] = mahotas.features.haralick(
                  label_data, distance=scale, ignore_zeros=True
              )
          except ValueError:
              features[:, :, index] = numpy.nan
  
      for direction, direction_features in enumerate(features):
          for feature_name, feature in zip(
              F_HARALICK, direction_features
          ):
              statistics += self.record_measurement(
                  image=image_name,
                  feature=feature_name,
                  obj=object_name,
                  result=feature,
                  scale="{:d}_{:02d}".format(scale, direction),
                  workspace=workspace,
                  gray_levels="{:d}".format(gray_levels),
              )
  
      return statistics
  
imports: import cellprofiler.gui.help.content
  import cellprofiler.icons
  import mahotas.features
  import numpy
  import skimage.exposure
  import skimage.measure
  import skimage.util
  from cellprofiler_core.constants.measurement import COLTYPE_FLOAT
  from cellprofiler_core.module import Module
  from cellprofiler_core.setting import HiddenCount, Divider, SettingsGroup, ValidationError
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.do_something import DoSomething, RemoveSettingButton
  from cellprofiler_core.setting.subscriber import ImageListSubscriber, LabelListSubscriber
  from cellprofiler_core.setting.text import Integer
  from cellprofiler_core.utilities.core.object import size_similarly
label_desc: Use image node_id 17 for calling the MeasureTexture obj's underlying member method code with example usage: obj.run_one(image_name, object_name, scale, workspace) and returns: statistics, statistics