def METHOD_NAME(self, original):
    # pylint: disable=redefined-builtin
    @functools.wraps(original)
    def wrapper(name, globals=None, locals=None, fromlist=(), level=0):
        is_absolute_import = level == 0
        if is_absolute_import:
            self._record_imported_module(name)
        return original(name, globals, locals, fromlist, level)
    return wrapper