code: def AddLabels(self, labels):
      
      for label in labels:
        if not self._VALID_LABEL_REGEX.match(label):
          raise ValueError((
              'Unsupported label: "{0:s}". A label must only consist of '
              'alphanumeric characters or underscores.').format(label))
  
      for label in labels:
        if label not in self.labels:
          self.labels.append(label)
docs: Adds labels to the event tag.
  
      Args:
        labels (list[str]): labels.
  
      Raises:
        ValueError: if a label is malformed.