Add some more python guards