Python Use Dictionary As Function In R