<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_disk_labels(self):
 """ Creates a mapping of device nodes to filesystem labels """

        path = '/dev/disk/by-label/'
        labels = {}
        if not os.path.isdir(path):
            return labels

        for label in os.listdir(path):
            label = label.replace('\\x2f', '/')
            device = os.path.realpath(path + '/' + label)
            labels[device] = label

        return labels