[PATCH 4/5] python: add the get_hosts support