Return a transaction object for the default view.

        Args:
            write (bool): Set to True for a write transaction.

        Returns:
            (synapse.lib.snap.Snap)

        NOTE: This must be used in a with block.

async def snap(self, user=None, view=None):
        '''
        Return a transaction object for the default view.

        Args:
            write (bool): Set to True for a write transaction.

        Returns:
            (synapse.lib.snap.Snap)

        NOTE: This must be used in a with block.
        '''

        if view is None:
            view = self.view

        if user is None:
            user = self.auth.getUserByName('root')

        snap = await view.snap(user)

        return snap