TST/BUG: fix NameError in network decorator