<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_group_id(self, uuid=None):
 """Get group id based on uuid. Args: uuid (str):
 optional uuid. defaults to self.cuuid Raises: PyLmodUnexpectedData: No group data was returned. requests.RequestException: Exception connection error Returns: int: numeric group id """

        group_data = self.get_group(uuid)
        try:
            return group_data['response']['docs'][0]['id']
        except (KeyError, IndexError):
            failure_message = ('Error in get_group response data - '
                               'got {0}'.format(group_data))
            log.exception(failure_message)
            raise PyLmodUnexpectedData(failure_message)