def import_metadata(module_paths):
cwd = os.getcwd()<EOL>if cwd not in sys.path:<EOL><INDENT>sys.path.insert(<NUM_LIT:0>, cwd)<EOL><DEDENT>modules = []<EOL>try:<EOL><INDENT>for path in module_paths:<EOL><INDENT>modules.append(import_module(path))<EOL><DEDENT><DEDENT>except ImportError as e:<EOL><INDENT>err = RuntimeError('<STR_LIT>'.format(path, str(e)))<EOL>raise_from(err, e)<EOL><DEDENT>return modules<EOL>
Import all the given modules