docs: def _writable(method):
      """Check that record is in defined status.
  
      :param method: Method to be decorated.
      :returns: Function decorated.
      """
      @wraps(method)
      def wrapper(self, *args, **kwargs):
          """Send record for indexing.
  
          :returns: Execution result of the decorated method.
  
          :raises InvalidOperationError: It occurs when the bucket is locked or
              deleted.
          """
          if self.bucket.locked or self.bucket.deleted:
              raise InvalidOperationError()
          return method(self, *args, **kwargs)
      return wrapper