<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def attribute_labels(self, attribute_id, params=None):
 """ Gets the security labels from a attribute Yields: Security label json """

        if params is None:
            params = {}
        if not self.can_update():
            self._tcex.handle_error(910, [self.type])

        for al in self.tc_requests.attribute_labels(
            self.api_type,
            self.api_sub_type,
            self.unique_id,
            attribute_id,
            owner=self.owner,
            params=params,
        ):
            yield al