implemant Map in pythongenerator