One way to state (omitting technical requirements) the Feynman-Kac formula that I am familiar with is as follows.

Let $u$ be a solution to the pde $$u_t(x,t)=-\frac{\sigma^2(x,t)}2u_{xx}(x,t)-V(x,t)u(x,t),\qquad t\in[0,T]\\ u(x,T)=f(x).$$ Then, $$u(x,t)=E\left[\exp\left(-\int_t^TV(X_s,s)~ds\right)~f(X_T)\Bigg|X_t=x\right],$$ where $X_t$ is a solution to the SDE $$dX_t=\sigma(X_t,t)d Wt$$

**Question**: Is there an analog of the above for more general Sturm-Liouville operators? More precisely,
if we define the differential operator
$$Lv(x,t)=\frac{-1}{w(x)}\left(\frac{d}{dx}\left[p(x)\frac{dv(x,t)}{dx}\right]+q(x)v(t,x)\right)$$
for some positive functions $w,p,q$,
is there an analog of the Feynman-Kac formula for the PDE
$$v_t(x,t)=Lv(x,t),\qquad t\in[0,T]\\
v(x,T)=f(x).$$
The main difference from above here is that $p$ is not constant.

I have to say that it's not clear to me what to expect from such a generalization if it makes sense, as I'm not sure how to interpret the operator $L$ in terms of Ito processes if $p$ is not constant.