def SetLabel(*labels):
  def Decorator(f):
    # If the method is not already tagged, we replace its label (the default
    # label is "small").
    function_labels = getattr(f, "labels", set())
    f.labels = function_labels.union(set(labels))

    return f

  return Decorator
Sets a label on a function so we can run tests with different types.
dataset/ETHPy150Open google/grr/grr/lib/test_lib.py/SetLabel