Create session as needed.

        .. note::

           Caller is responsible for cleaning up the session after
           all partitions have been processed.

def _get_session(self):
        """Create session as needed.

        .. note::

           Caller is responsible for cleaning up the session after
           all partitions have been processed.
        """
        if self._session is None:
            session = self._session = self._database.session()
            session.create()
        return self._session