fixed resolve_method_dynamically

use importlib.import_module instead because sys.modules is merely a cache of previously imported modules