code: def scan_for_plugins(directory):
          
          if not os.path.exists(os.path.expanduser(directory)):
              raise FileNotFoundError("Unable to locate directory %s" % directory)
  
          files_in_dir = get_files_recursive(directory)
          plugins = {}
          for file in files_in_dir:
              plugins_in_module = PluginManager.get_plugins_in_module(file, suppress=True)
  
              if plugins_in_module is None:
                  continue
  
              plugins[file] = plugins_in_module
  
          return plugins
docs: Scan a directory for modules that contains plugin(s).
          :param directory: Path of the folder/directory to scan.
          :return: Dictionary of file (key) and plugins (value), where the key is the path of the module and value is a list of plugins inside that module.
          :rtype: dict