div into python mock code