code: def CollectFromWindowsRegistry(
        cls, artifacts_registry, knowledge_base, searcher):
      
      for preprocess_plugin in cls._windows_registry_plugins.values():
        artifact_definition = artifacts_registry.GetDefinitionByName(
            preprocess_plugin.ARTIFACT_DEFINITION_NAME)
        if not artifact_definition:
          logger.warning('Missing artifact definition: {0:s}'.format(
              preprocess_plugin.ARTIFACT_DEFINITION_NAME))
          continue
  
        logger.debug('Running Windows Registry preprocessor plugin: {0:s}'.format(
            preprocess_plugin.ARTIFACT_DEFINITION_NAME))
        try:
          preprocess_plugin.Collect(knowledge_base, artifact_definition, searcher)
        except (IOError, errors.PreProcessFail) as exception:
          logger.warning((
              'Unable to collect value from artifact definition: {0:s} '
              'with error: {1!s}').format(
                  preprocess_plugin.ARTIFACT_DEFINITION_NAME, exception))
docs: Collects values from Windows Registry values.
  
      Args:
        artifacts_registry (artifacts.ArtifactDefinitionsRegistry): artifacts
            definitions registry.
        knowledge_base (KnowledgeBase): to fill with preprocessing information.
        searcher (dfwinreg.WinRegistrySearcher): Windows Registry searcher to
            preprocess the Windows Registry.