Require hardware where it is needed
test_mach: move helper method out of global namespace