code: def group_exists(self, group_name):
          
          res = self._make_ocs_request(
              'GET',
              self.OCS_SERVICE_CLOUD,
              'groups?search=' + group_name
          )
  
          if res.status_code == 200:
              tree = ET.fromstring(res.content)
  
              for code_el in tree.findall('data/groups/element'):
                  if code_el is not None and code_el.text == group_name:
                      return True
  
              return False
  
          raise HTTPResponseError(res)
docs: Checks a group via provisioning API.
          If you get back an error 999, then the provisioning API is not enabled.
  
          :param group_name:  name of group to be checked
          :returns: True if group exists
          :raises: HTTPResponseError in case an HTTP error status was returned