code: def Collect(self, knowledge_base):
      
      environment_variable = knowledge_base.GetEnvironmentVariable('programdata')
      allusersappdata = getattr(environment_variable, 'value', None)
  
      if not allusersappdata:
        environment_variable = knowledge_base.GetEnvironmentVariable(
            'allusersprofile')
        allusersdata = getattr(environment_variable, 'value', None)
  
        if allusersdata:
          allusersappdata = '\\'.join([allusersdata, 'Application Data'])
  
      if allusersappdata:
        environment_variable = artifacts.EnvironmentVariableArtifact(
            case_sensitive=False, name='allusersappdata', value=allusersappdata)
  
        try:
          logger.debug('setting environment variable: {0:s} to: "{1:s}"'.format(
              'allusersappdata', allusersappdata))
          knowledge_base.AddEnvironmentVariable(environment_variable)
        except KeyError:
          # TODO: add and store preprocessing errors.
          pass
docs: Collects values from the knowledge base.
  
      Args:
        knowledge_base (KnowledgeBase): to fill with preprocessing information.
  
      Raises:
        PreProcessFail: if the preprocessing fails.