<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(self, key, value):
 """Retrieve single group record by id or name Supports resource cache Keyword Args: id (str):
 Full Group ID name (str):
 Group name Raises: TypeError: Unexpected or more than one keyword argument provided ValueError: No matching group found based on provided inputs Returns: Group: Group instance matching provided inputs """

        if key == 'id':
            response = self._swimlane.request('get', 'groups/{}'.format(value))
            return Group(self._swimlane, response.json())

        else:
            response = self._swimlane.request('get', 'groups/lookup?name={}'.format(value))
            matched_groups = response.json()

            for group_data in matched_groups:
                if group_data.get('name') == value:
                    return Group(self._swimlane, group_data)

            raise ValueError('Unable to find group with name "{}"'.format(value))