code: def module_loader(dir_path, filter_str=""):
      assert os.path.exists(dir_path)
  
      for module in pkgutil.iter_modules([dir_path]):
          # filter illegal module
          if filter_str != "" and module.name.find(filter_str) == -1:
              continue
          module_path = os.path.join(dir_path, module.name)
          module_name = os.path.relpath(module_path).replace(
              os.path.sep, "."
          )
          assert "textflint" in module_name
          module_name = module_name[module_name.find("textflint") :]
          yield importlib.import_module(module_name)
  
imports: import json
  import os
  import pkgutil
  import importlib
  import tarfile
  from tempfile import NamedTemporaryFile
  import time
  import pandas
  import torch
  import glob
  from .None import device
  from .install import download_if_needed
label_desc: Use image node_id 1 for calling a global function with example usage: module_loader(dir_path, filter_str) without return types