code: def _normalize_group_attrs(self, attrs):
          
          for key in self.group_attrs_keys:
              if key not in attrs:
                  raise MissingGroupAttr(key)
              if type(attrs[key]) is list and len(attrs[key]) == 1:
                  attrs[key] = attrs[key][0]
              if type(attrs[key]) is list and len(attrs[key]) != 1:
                  raise MultivaluedGroupAttr(key)
docs: Normalize the attributes used to set groups
          If it's a list of one element, it just become this
          element.
          It raises an error if the attribute doesn't exist
          or if it's multivaluated.