'Return all labels (Label instances) for this control.
If the control was surrounded by a <label> tag, that will be the first
label; all other labels, connected by \'for\' and \'id\', are in the order
that appear in the HTML.'

def get_labels(self):

    res = []
    if self._label:
        res.append(self._label)
    if self.id:
        res.extend(self._form._id_to_labels.get(self.id, ()))
    return res
