importimportlibfromosimportpathasospfrombasicsr.utilsimportscandir# automatically scan and import dataset modules for registry# scan all the files that end with '_dataset.py' under the data folderdata_folder=osp.dirname(osp.abspath(__file__))dataset_filenames=[osp.splitext(osp.basename(v))[0]forvinscandir(data_folder)ifv.endswith('_dataset.py')]# import all the dataset modules_dataset_modules=[importlib.import_module(f'hat.data.{file_name}')forfile_nameindataset_filenames]