def _ReadLabels(self, yaml_definition, artifact_definition, name):
    labels = yaml_definition.get(u'labels', [])
    undefined_labels = [
        item for item in labels if item not in definitions.LABELS]

    if undefined_labels:
      raise errors.FormatError(
          u'Artifact definition: {0} label(s): {1} not defined.'.format(
              name, ', '.join(undefined_labels)))

    artifact_definition.labels = yaml_definition.get(u'labels', [])
Reads the optional artifact definition labels.
dataset/ETHPy150Open ForensicArtifacts/artifacts/artifacts/reader.py/YamlArtifactsReader._ReadLabels