A Wilson line picture of the Levin-Wen partition functions