microbenchmar scripts do not work consistently, at least run into problem for me:
Tihs is because this line of check_compiled method
doesn't work consistently. It every time just get the root module instead of the submodule and fails to identify the the given moudle is compiled with cython.
Also it is not recommended to use _import_ method because it is python internal and it is meant to be used by the Python interpreter. importlib.import_module is the recommended way of finding the module.
Pull request: https://github.com/apache/beam/pull/9066