code: def update_or_create(cls, append_lists=True, with_status=False, **kwargs):
          
          was_created, was_modified = False, False 
          element = None
          try: 
              element = cls.get(kwargs.get('name')) 
              if append_lists:
                  iplist = element.iplist
                  diff = [i for i in kwargs.get('iplist', []) if i not in iplist]
                  if diff:
                      iplist.extend(diff)
                  else:
                      iplist = []
              else:
                  iplist = kwargs.get('iplist', [])
              
              if iplist:
                  element.upload(json={'ip': iplist}, as_type='json')
                  was_modified = True
      
          except ElementNotFound:
              element = cls.create( 
                  kwargs.get('name'), 
                  iplist = kwargs.get('iplist', []))
              was_created = True
  
          if with_status: 
              return element, was_modified, was_created 
          return element
docs: Update or create an IPList.
          
          :param bool append_lists: append to existing IP List
          :param dict kwargs: provide at minimum the name attribute
              and optionally match the create constructor values
          :raises FetchElementFailed: Reason for retrieval failure