def _attr_setdefault(self, attrs):
        if 'id' not in attrs and self.id is not None:
            attrs['id'] = self.id
Add an ID to the attrs if there is none.
dataset/ETHPy150Open mitsuhiko/fungiform/fungiform/widgets.py/Widget._attr_setdefault