code: def _common_label_scope(labels: list[str]) -> str:
      """Find the longest prefix of all labels.
  
      The prefix must ends with ``/``.
      """
      if not labels:
          return ""
      for i in range(len(labels[0]) - 1, -1, -1):
          if labels[0][i] == "/" and all(
              s.startswith(labels[0][: i + 1]) for s in labels
          ):
              return labels[0][: i + 1]
      return ""
  
imports: from __future__ import annotations
  import itertools
  import logging
  import random
  import warnings
  from typing import Any, cast
  import nni
  from nni.mutable import Sample, Mutable, LabeledMutable, Categorical, CategoricalMultiple, label_scope
  from nni.nas.evaluator import Evaluator
  from nni.nas.space import ExecutableModelSpace
  from .space import SlimBenchmarkSpace
label_desc: Use image node_id 2 for calling a global function with example usage: _common_label_scope(labels) and returns: str, str, labels