code: def strata_by_labels(labels):
      """Constucts a list of strata (lists) based on unique values of ``labels``.
  
      :param labels: iterable, identical values will end up in identical strata
      :returns: the strata, as a list of lists
      """
      return [
          list(zip(*g))[0]
          for _, g in it.groupby(enumerate(labels), op.itemgetter(1))
      ]
  
imports: import math
  import random
  import itertools
  import functools
  import operator
  import array
  import inspect
label_desc: Use image node_id 3 for calling a global function with example usage: strata_by_labels(labels) and returns: unknown