'Create a session. `lib` is a Library object. `loghandler` is a
logging.Handler. Either `paths` or `query` is non-null and indicates
the source of files to be imported.'

def __init__(self, lib, loghandler, paths, query):

    self.lib = lib
    self.logger = self._setup_logging(loghandler)
    self.paths = paths
    self.query = query
    self._is_resuming = dict()
    if self.paths:
        self.paths = list(map(normpath, self.paths))
