code: def _ReadLabels(self, artifact_definition_values, artifact_definition, name):
      
      labels = artifact_definition_values.get('labels', [])
  
      undefined_labels = set(labels).difference(self.labels)
      if undefined_labels:
        raise errors.FormatError(
            'Artifact definition: {0:s} found undefined labels: {1:s}.'.format(
                name, ', '.join(undefined_labels)))
  
      artifact_definition.labels = labels
docs: Reads the optional artifact definition labels.
  
      Args:
        artifact_definition_values (dict[str, object]): artifact definition
            values.
        artifact_definition (ArtifactDefinition): an artifact definition.
        name (str): name of the artifact definition.
  
      Raises:
        FormatError: if there are undefined labels.