<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def create_group(self, attrs, members, folder_id=None, tags=None):
 """Create a contact group XML example : <cn l="7> ## ContactSpec <a n="lastName">MARTIN</a> <a n="firstName">Pierre</a> <a n="email">pmartin@example.com</a> </cn> Which would be in zimsoap : attrs = { 'lastname': 'MARTIN', 'firstname': 'Pierre', 'email': 'pmartin@example.com' } folder_id = 7 :param folder_id: a string of the ID's folder where to create contact. Default '7' :param tags: comma-separated list of tag names :param members: list of dict. Members with their type. Example {'type': 'I', 'value': 'manual_addresse@example.com'}. least one attr is required :returns: the created zobjects.Contact """

        cn = {}
        cn['m'] = members

        if folder_id:
            cn['l'] = str(folder_id)
        if tags:
            cn['tn'] = tags

        attrs = [{'n': k, '_content': v} for k, v in attrs.items()]
        attrs.append({'n': 'type', '_content': 'group'})
        cn['a'] = attrs
        resp = self.request_single('CreateContact', {'cn': cn})

        return zobjects.Contact.from_dict(resp)