def _ReloadArtifacts(self):
    """Load artifacts from all sources."""
    self._artifacts = {}
    files_to_load = []
    for dir_path in self._sources.get("dirs", []):
      try:
        for file_name in os.listdir(dir_path):
          if (file_name.endswith(".json") or file_name.endswith(".yaml") and
              not file_name.startswith("test")):
            files_to_load.append(os.path.join(dir_path, file_name))
      except (IOError, __HOLE__):
        logging.warn("Artifact directory not found: %s", dir_path)
    files_to_load += self._sources.get("files", [])
    logging.debug("Loading artifacts from: %s", files_to_load)
    self._LoadArtifactsFromFiles(files_to_load)

    self.ReloadDatastoreArtifacts()
dataset/ETHPy150Open google/grr/grr/lib/artifact_registry.py/ArtifactRegistry._ReloadArtifacts