code: def _ParseValueData(self, knowledge_base, value_data):
      
      if not isinstance(value_data, py2to3.UNICODE_TYPE):
        raise errors.PreProcessFail(
            'Unsupported Windows Registry value type: {0:s} for '
            'artifact: {1:s}.'.format(
                type(value_data), self.ARTIFACT_DEFINITION_NAME))
  
      # Map the Windows code page name to a Python equivalent name.
      codepage = 'cp{0:s}'.format(value_data)
  
      if not knowledge_base.codepage:
        try:
          knowledge_base.SetCodepage(codepage)
        except ValueError:
          # TODO: add and store preprocessing errors.
          pass
docs: Parses Windows Registry value data for a preprocessing attribute.
  
      Args:
        knowledge_base (KnowledgeBase): to fill with preprocessing information.
        value_data (object): Windows Registry value data.
  
      Raises:
        errors.PreProcessFail: if the preprocessing fails.