<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _register_resources(self, api_dirs, do_checks):
        '''Register all Apis, Resources and Models with the application.'''
        msg = 'Looking-up for APIs in the following directories: {}'
        log.debug(msg.format(api_dirs))
        if do_checks:
            check_and_load(api_dirs)
        else:
            msg = 'Loading module "{}" from directory "{}"'
            for loader, mname, _ in pkgutil.walk_packages(api_dirs):
                sys.path.append(os.path.abspath(loader.path))
                log.debug(msg.format(mname, loader.path))
                import_module(mname)