pub fn acquire_shared_session<C, F, A>(
    shared: SharedChannel<LinearToShared<F>>,
    cont1: impl FnOnce(<C as Context>::Length) -> PartialSession<<C as AppendContext<(<F as SharedRecApp<SharedToLinear<LinearToShared<F>>>>::Applied, ())>>::Appended, A> + Send + 'static
) -> PartialSession<C, A> where
    C: Context + AppendContext<(<F as SharedRecApp<SharedToLinear<LinearToShared<F>>>>::Applied, ())>,
    F: Protocol + SharedRecApp<SharedToLinear<LinearToShared<F>>>,
    A: Protocol,
    <F as SharedRecApp<SharedToLinear<LinearToShared<F>>>>::Applied: Protocol