Squashed commits: [960414a] simplify the user interface for defining python loss module [dbb797e] test python loss on gpu [f5d94a8] fix lint errors (+1 squashed commit) Squashed commits: [5d7c7ea] add an example to define loss function in Python