Let $G$ be a Lie group (possibly disconnected). Consider the natural short-exact sequence $$1\rightarrow G_0\rightarrow G\rightarrow\pi_0(G)\rightarrow 1,$$ where $G_0$ is the identity component of $G$, and $\pi_0(G)\cong G/G_0$ is the component group. Under what conditions does this sequence admit a splitting, so that $G$ is a semidirect product of $G_0$ and $\pi_0(G)$?. Useful answers might include (but need not be limited to) some types of Lie group $G$ for which a splitting exists. I would appreciate any and all references and suggestions.
Thanks!