importimportlibfromosimportpathasospfrombasicsr.utilsimportscandir# automatically scan and import arch modules for registry# scan all the files that end with '_arch.py' under the archs folderarch_folder=osp.dirname(osp.abspath(__file__))arch_filenames=[osp.splitext(osp.basename(v))[0]forvinscandir(arch_folder)ifv.endswith('_arch.py')]# import all the arch modules_arch_modules=[importlib.import_module(f'hat.archs.{file_name}')forfile_nameinarch_filenames]