Fixing imports and python2 cases for stubbing unbound methods