code: def equals(self, rest_object):
          
  
          if self._is_dirty:
              return False
  
          if rest_object is None:
              return False
  
          if not isinstance(rest_object, NURESTObject):
              raise TypeError('The object is not a NURESTObject %s' % rest_object)
  
          if self.rest_name != rest_object.rest_name:
              return False
  
          if self.id and rest_object.id:
              return self.id == rest_object.id
  
          if self.local_id and rest_object.local_id:
              return self.local_id == rest_object.local_id
  
          return False
docs: Compare with another object