Add Cost.is_stochastic to make warning more selective

https://github.com/klen/python-mode is what I used to use, I think.