Non-homogeneous PDE with Non-homogeneous BC's - Eigenfunction Expansion

I have an exam tomorrow, and I came across one question that I don't really know how to start and I was really hoping someone could help me out with it.

Use the method of eigenfunction expansion to obtain a solution to

$\displaystyle u_t = u_{xx} + q(x,t)$

with initial condition:

$\displaystyle u(x,0) = f(x)$

BC's: $\displaystyle u(\pi,t) = u_\pi, u(0,t) = u_0$

where $\displaystyle u_\pi, u_0$ are given constants.

So I need to start with a trial solution based on the homogeneous part of the problem i.e.

$\displaystyle u_t = u_{xx}$ which if the boundary conditions were something like $\displaystyle u(\pi,t) = 0, u(0,t) = 0$ I would start with a solution

$\displaystyle \displaystyle u(x,t) = \sum_1^{\infty} c_n(t) \sin (n \pi)$

but I don't know how to determine a trial solution if the BC's are non-homogeneous.