def ParseEntry(self, format_version, entry_data):
    """Parses an UserAssist entry.

    Args:
      format_version (int): format version.
      entry_data (bytes): entry data.

    Returns:
      user_assist_entry_v3|user_assist_entry_v5: UserAssist entry.

    Raises:
      ParseError: if the value data could not be parsed.
    """
    if format_version == 3:
      data_type_map = self._GetDataTypeMap('user_assist_entry_v3')
    elif format_version == 5:
      data_type_map = self._GetDataTypeMap('user_assist_entry_v5')

    entry_data_size = data_type_map.GetByteSize()
    if entry_data_size != len(entry_data):
      raise errors.ParseError((
          'Version: {0:d} size mismatch (calculated: {1:d}, '
          'stored: {2:d}).').format(
              format_version, entry_data_size, len(entry_data)))

    try:
      user_assist_entry = self._ReadStructureFromByteStream(
          entry_data, 0, data_type_map, 'UserAssist entry')
    except (ValueError, errors.ParseError) as exception:
      raise errors.ParseError(
          'Unable to parse UserAssist entry value with error: {0!s}'.format(
              exception))

    if self._debug:
      self._DebugPrintEntry(format_version, user_assist_entry)

    return user_assist_entry