code: def update_or_create(cls, with_status=False, overwrite_existing=False, **kw):
          
          created = False
          modified = False
          try:
              element = cls.get(kw.get('name'))
          except ElementNotFound:
              element = cls.create(**kw)
              created = True
          
          if not created:
              if overwrite_existing:
                  element.data['entries'] = [
                      {'{}_entry'.format(element.typeof): entry}
                      for entry in kw.get('entries')]
                  modified = True
              else:
                  if 'comment' in kw and kw['comment'] != element.comment:
                      element.comment = kw['comment']
                      modified = True
                  for entry in kw.get('entries', []):
                      if cls._view(**entry) not in element:
                          element.add_entry(**entry)
                          modified = True
  
          if modified:
              element.update()
              
          if with_status:
              return element, modified, created
          return element
docs: Update or create the Access List. This method will not attempt to 
          evaluate whether the access list has differences, instead it will
          update with the contents of the payload entirely. If the intent is
          to only add or remove a single entry, use `~add_entry` and `~remove_entry`
          methods.
          
          :param bool with_status: return with 3-tuple of (Element, modified, created)
              holding status
          :param bool overwrite_existing: if the access list exists but instead of an
              incremental update you want to overwrite with the newly defined entries,
              set this to True (default: False)
          :return: Element or 3-tuple with element and status