Merge "Add some helper functions for Emulator."