def add_client_session(engine, session_id, client_id, sid, base_url, workspace
    ):
    """Add client session."""
    logger = engine.logger
    clients = engine.store.clients
    registered_sessions = engine.store.registered_sessions
    if client_id in clients:
        clients[client_id].append(sid)
        client_connected = True
    else:
        clients[client_id] = [sid]
        client_connected = False
    logger.info('Adding client session %s', sid)
    registered_sessions[sid] = {'client': client_id, 'session': session_id,
        'base_url': base_url, 'workspace': workspace}
    return client_connected
