import imp


def load_module_file(module_name, file_path):
    """Load module given name and path."""
    with open(file_path, 'r') as f:
        return imp.load_module(module_name, f, "%s.py" % module_name,
                               (".py", "r", imp.PY_SOURCE))