code: def test_get_measurement_columns_groups():
      #
      # Return the metadata grouping tags measurement if groups
      #
      groups = cellprofiler_core.modules.groups.Groups()
      groups.wants_groups.value = True
      choices = ["Plate", "Well", "Site"]
      for i, choice in enumerate(choices):
          if i > 0:
              groups.add_grouping_metadata()
          del groups.grouping_metadata[i].metadata_choice.choices[:]
          groups.grouping_metadata[i].metadata_choice.choices.extend(
              choices
          )
          groups.grouping_metadata[i].metadata_choice.value = choice
      columns = groups.get_measurement_columns(None)
      assert len(columns) == 5
      column = columns[0]
      assert (
          column[0]
          == cellprofiler_core.constants.measurement.EXPERIMENT
      )
      assert (
          column[1]
          == cellprofiler_core.constants.measurement.M_GROUPING_TAGS
      )
      assert column[2].startswith(
          cellprofiler_core.constants.measurement.COLTYPE_VARCHAR
      )
      column = columns[1]
      assert column[0] == cellprofiler_core.constants.measurement.IMAGE
      assert column[1] == "Group_Length"
      assert column[2].startswith(
          cellprofiler_core.constants.measurement.COLTYPE_INTEGER
      )
      column_metadata = []
      for column in columns[2:]:
          assert (
              column[0] == cellprofiler_core.constants.measurement.IMAGE
          )
          assert (
              column[2]
              == cellprofiler_core.constants.measurement.COLTYPE_VARCHAR
          )
          column_metadata.append(column[1])
      for choice in choices:
          assert (
              cellprofiler_core.constants.measurement.C_METADATA
              + "_"
              + choice
              in column_metadata
          )
  
file_path: CellProfiler/tests/core/modules/test_groups.py
imports: import io
  import os
  import numpy
  import cellprofiler_core.constants.measurement
  import cellprofiler_core.measurement
  import cellprofiler_core.modules.groups
  import cellprofiler_core.pipeline
  import cellprofiler_core.workspace
  import tests.core
label_desc: Use image node_id 9 for calling a global function with example usage: test_get_measurement_columns_groups() without return types