def run(self):
        labels = DockerfileParser(self.workflow.builder.df_path).labels
        for label in self.required_labels:
            if labels.get(label) is None:
                msg = "Dockerfile is missing '{0}' label.".format(label)
                self.log.error(msg)
                raise AssertionError(msg)
run the plugin
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/plugins/pre_assert_labels.py/AssertLabelsPlugin.run