'Runs a function with the document lock held, passing the document to the function.
The function may return a future.
Args:
func: function that takes a single parameter (the Document) and returns None or a Future
Returns:
a Future containing the result of the function'

@abstractmethod
def with_locked_document(self, func):

    raise NotImplementedError('locked_document')
