def savepoint(optimistic=False):
    """Create a savepoint.

        If the *optimistic* argument is true, then data managers that don't
        support savepoints can be used, but an error will be raised if the
        savepoint is rolled back.

        An `ISavepoint` object is returned.
        """
