Getting the entity a player is spectating?

Quick question: how do I get the entity a player is spectating? I need this for the Fretta contest. I only found functions for setting the entity, but not for getting. Anyone knows a function that does this?

GetObserverTarget

Another obscure function. Thanks :v: