Automatically turn callbacks into something than makes sens for pythonjs