The fundamental problem here is that we are in a base class, which shouldn't care about FE/SC/something else. One solution for this that I can see would be to extract this code into a helper method _get_gpu_rho(self), which can then be overridden in the SC/FE superclass.