<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ParseHeader(self, format_type, value_data):
 """Parses the header. Args: format_type (int):
 format type. value_data (bytes):
 value data. Returns: AppCompatCacheHeader: header. Raises: ParseError: if the value data could not be parsed. """

    data_type_map_name = self._HEADER_DATA_TYPE_MAP_NAMES.get(format_type, None)
    if not data_type_map_name:
      raise errors.ParseError(
          'Unsupported format type: {0:d}'.format(format_type))

    data_type_map = self._GetDataTypeMap(data_type_map_name)

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

    header_data_size = data_type_map.GetByteSize()
    if format_type == self._FORMAT_TYPE_10:
      header_data_size = header.signature

    cache_header = AppCompatCacheHeader()
    cache_header.header_size = header_data_size
    cache_header.number_of_cached_entries = getattr(
        header, 'number_of_cached_entries', 0)

    return cache_header