<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update(self, group_id, name=None, order=None, collapsed=None):
 """Update a Component Group :param int group_id: Component Group ID :param str name: Name of the component group :param int order: Order of the group :param int collapsed: Collapse the group? :return: Updated component group data (:class:`dict`) .. seealso:: https://docs.cachethq.io/reference#put-component-group """

        data = ApiParams()
        data['group'] = group_id
        data['name'] = name
        data['order'] = order
        data['collapsed'] = collapsed
        return self._put('components/groups/%s' % group_id, data=data)['data']