docs: def update_resource(self, resource):
          '''Perform an atomic update for an existing resource'''
          index = self.resources.index(resource)
          data = {
              'resources__{index}'.format(index=index): resource
          }
          self.update(**data)
          self.reload()
          post_save.send(self.__class__, document=self)