<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def history_list(self, **kwargs):
 """History list of alarm state."""

        url_str = self.base_url + '/state-history/'
        if 'dimensions' in kwargs:
            dimstr = self.get_dimensions_url_string(kwargs['dimensions'])
            kwargs['dimensions'] = dimstr
        if kwargs:
            url_str = url_str + '?%s' % parse.urlencode(kwargs, True)
        resp = self.client.list(url_str)
        return resp['elements'] if type(resp) is dict else resp