code: def get_measurements_for_good_pipeline(nimages=1, group_numbers=None):
      """Get an appropriately initialized measurements structure for the good pipeline"""
      import tests.core
  
      path = os.path.abspath(
          os.path.join(
              os.path.dirname(tests.core.__file__),
              "data/ExampleSBSImages",
          )
      )
      # path = os.path.join(tests.core.modules.example_images_directory(), "ExampleSBSImages")
      m = cellprofiler_core.measurement.Measurements()
      if group_numbers is None:
          group_numbers = [1] * nimages
      group_indexes = [1]
      last_group_number = group_numbers[0]
      group_index = 1
      for group_number in group_numbers:
          if group_number == last_group_number:
              group_index += 1
          else:
              group_index = 1
          group_indexes.append(group_index)
      m.add_experiment_measurement(M_IMAGE_SET_ZIP_DICTIONARY, b"")
      for i in range(1, nimages + 1):
          filename = "Channel2-%02d-%s-%02d.tif" % (
              i,
              "ABCDEFGH"[int((i - 1) / 12)],
              ((i - 1) % 12) + 1,
          )
          url = cellprofiler_core.utilities.pathname.pathname2url(
              os.path.join(path, filename)
          )
          m[
              cellprofiler_core.constants.measurement.IMAGE,
              cellprofiler_core.constants.measurement.C_FILE_NAME
              + "_DNA",
              i,
          ] = filename
          m[
              cellprofiler_core.constants.measurement.IMAGE,
              cellprofiler_core.constants.measurement.C_PATH_NAME
              + "_DNA",
              i,
          ] = path
          m[
              cellprofiler_core.constants.measurement.IMAGE,
              cellprofiler_core.constants.measurement.C_URL + "_DNA",
              i,
          ] = url
          m[
              cellprofiler_core.constants.measurement.IMAGE,
              cellprofiler_core.constants.measurement.GROUP_NUMBER,
              i,
          ] = group_numbers[i - 1]
          m[
              cellprofiler_core.constants.measurement.IMAGE,
              cellprofiler_core.constants.measurement.GROUP_INDEX,
              i,
          ] = group_indexes[i - 1]
          image_set = {"DNA": ImagePlane(ImageFile(url))}
          blob = [zlib.compress(pickle.dumps(image_set))]
          m[
              cellprofiler_core.constants.measurement.IMAGE,
              cellprofiler_core.modules.namesandtypes.M_IMAGE_SET,
              i,
          ] = blob
      pipeline = cellprofiler_core.pipeline.Pipeline()
      pipeline.loadtxt(io.StringIO(GOOD_PIPELINE))
      pipeline.write_pipeline_measurement(m)
      return m
  
imports: import io
  import queue
  import time
  import os
  import pytest
  import pickle
  import tempfile
  import threading
  import traceback
  import unittest
  import uuid
  import zlib
  import numpy
  import zmq
  import cellprofiler_core.analysis
  import cellprofiler_core.analysis.reply
  import cellprofiler_core.constants.measurement
  import cellprofiler_core.constants.worker
  import cellprofiler_core.measurement
  import cellprofiler_core.module._identify
  import cellprofiler_core.modules.namesandtypes
  import cellprofiler_core.pipeline
  import cellprofiler_core.preferences
  import cellprofiler_core.utilities.image
  import cellprofiler_core.utilities.measurement
  import cellprofiler_core.utilities.pathname
  import cellprofiler_core.utilities.zmq
  import cellprofiler_core.worker
  import cellprofiler_core.analysis.request
  from cellprofiler_core.constants.modules.namesandtypes import M_IMAGE_SET_ZIP_DICTIONARY
  from cellprofiler_core.pipeline import ImageFile
  from cellprofiler_core.pipeline import ImagePlane
  import tests.core
  import tests.core.modules
label_desc: Use image node_id 1 for calling a global function with example usage: get_measurements_for_good_pipeline(nimages, group_numbers) and returns: m