<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_label(cls, label, datacenter=None):
 """Retrieve disk image id associated to a label."""

        result = cls.list(datacenter=datacenter)
        image_labels = dict([(image['label'], image['disk_id'])
                             for image in result])

        return image_labels.get(label)